This program is used to create a Vagrant mechine to host the Scount Engineering Day Web Application. Anyone who would like to help with development please contact Ryan Dufrene at rdufrene@mitre.org, or Walter Hiranpat at whiranpat@mitre.org.
- Git Bash (only needed for windows)
- Vagrant
- VirtualBox (other virtualization services will work, however VirtualBox is recommended)
- Ansible
Before contributing please make sure you meet the requirements stated in the CONTRIBUTING.md file
- Fork the project
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
This should be done by the command line of your choosing and after the required software above has been installed. (Note: Setting up the enviorment will require internet access.)
- Clone this repository into the folder you would like:
git clone https://github.com/ScoutEngineeringDay/SED-Deployments.git
- Enter the new folder:
cd SED-Deployments
- Check out the dev branch:
git checkout -t origin/dev
- Install Vagrant Virtualbox Guest Additions plugin:
vagrant plugin install vagrant-vbguest
- Encrypt your Ansible variables as described in the wiki page on Ansible Vault
- Start Vagrant:
vagrant up
- Website should now be on localhost:8080
Now you should have an instance of the website working on your computer that is pulling code live from the /your_location_choice/content/SED-Deployments/SED-Web-Application
folder.
After making changes to the code located in /your_location_choice/SED-Deployments/content/SED-Web-Application
you will notice that the website will not automatically update.
The following steps will update the local delpyment of the website:
- Open command line of your choosing.
- Enter the folder that holds the repository:
cd /your_location_choice/SED-Deployments
- SSH into the Vagrant mechine:
vagrant ssh
- Enter the code source:
/ansible
- Run the update script:
./SED-web-update.sh
Wait for the site to recompile and then refresh http://localhost:8080/.
To provide the password used to decrypt secrets stored in the Ansible Vault, save the password in a file named /ansible-vault.txt
Secrets files are named *.vault.yml
and must all have the same password for decryption. In order to better track the variables stored in vault files, a plaintext version is stored in a corresponding *.yml
file. It is the developer's responsibility to make sure that changes are reflected in both locations. For information about creating and editing vault files, see the Ansible documentation.
-
Local host urls:
- http://localhost:8080/: Local Website Home Page
- http://localhost:8080/admin/: Local Admin Page
-
Main Test Website url:
- http://www.sedteam.com/: Website Home Page
- http://www.sedteam.com/admin/: Website Admin Page