Skip to content

SaltStack Challenge. Automate web server and db server in opensuse

License

Notifications You must be signed in to change notification settings

FR0NK3NST33N/salt-opensuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salt Vagrant OpenSUSE Web Application Demo

A Salt State/Executable generated web application using Vagrant w/ OpenSUSE.

Instructions

Run the following commands in a terminal. Git, VirtualBox and Vagrant must already be installed.

git clone https://github.com/Brownie2023/salt-opensue.git
cd salt-opensuse
vagrant up

This will download an OpenSUSE VirtualBox image and create three virtual machines for you. One will be a Salt Master named master and two will be Salt Minions named minion1 and minion2. Minion1 is used to host a Angular and Flask web app that connects to a PostgreSQL database hosted on minion2. Because the minion keys are pre-generated and reside in the repo, please be sure to regenerate new keys if you use this for production purposes.

You can then run the following commands to log into the Salt Master and begin using Salt to start and configure our services.

vagrant ssh master
su                                                #password: vagrant
salt '*' state.apply                              #install and necessary packages on minion1 && 2 etc.
salt 'minion1' state.apply postgres.create_db     #creates initial postgres relation for our app
salt 'minion1' state.apply web_services.run_site  #starts our flask app

Lastly, navigate to

http://192.168.50.11

Thanks to https://github.com/UtahDave (cloned from here) and all of the other contributors to this salt vagrant demo template.

About

SaltStack Challenge. Automate web server and db server in opensuse

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published