This is a nubis deployment repository for BMO (bugzilla.mozilla.org)
If you are new to the Nubisproject you will need to set up some prerequisites.
It is important to understand that everything is deployed in a layers. The "stack" if you will goes &something like this:
We will walk through updating each layer individually, however any time you are updating a lower layer you should test each higher layer.
You will see that updates at all layers follow a similar git style work-flow. For the deployment layer and the application layer the actual deployment mechanism is a Jenkins instance. When you land code on the deployment repositories' master branch it will automatically be deployed into stage.
At the present time the Nubis team will update the platform components. Once we have upgraded to the 1.0.3 release the Bugzilla team will take responsibility for updating the platform components.
Instructions for updating the Nubis platform can be found in the upgrading doc.
Updating the deployment is accomplished by following a normal git work-flow:
- Checkout the deployment repository
- Initilize the application code submodule
- Make necessary changes
- Check deployment code into github
- Test deployment in stage
- Deploy the code into production
Fortunately, updating the application code is exactly the same as updating the deployment code with one notable exception:
- Checkout the deployment repository
- Initialize the application code submodule
Make necessary changes- Check deployment code into github
- Test deployment in stage
- Deploy the code into production
You will want to grab the latest code
git clone [email protected]:gozer/bugzilla.mozilla.org.git
The application code is included in this deployment repository as a git submodule. To update to the latest application code you simply update the git submodule.
git submodule update --init --recursive
If you need to make any changes to the deployment code (EC2 instances, RDS, etc...) you do that here.
Once you have updated the application code, the deployment code, or both, all you need to do is check these changes into the deployment repository. You can either do that directly or submit a pull request depending on your work-flow.
git add [whatever you updated]
git commit
git push
git pull-request (If you have [hub](https://github.com/github/hub#git--hub--github) installed)
Once your code has landed on master, Jenkins will automatically pull in the new code, rebuild AMIs and deploy them into the stage environment. After a few minutes the new deployment will be ready for testing.
You can see what is running in stage visiting this url.
After you have completed any necessary tests in stage you can push to production (based on your teams process). You simply log into the Jenkins instance and ...
Start by visiting the Jenkins URL and then log in.
If this is your first time logging in to this Jenkins instance you will be prompted to allow Jenkins to authorize you against GitHub. It will look similar to this (Note: I have removed some of the details for brevity).
In Jenkins click on the 'bugzilla-deployment' link to go to the deployment job.
Locate the latest successful build. This is identified by a blue dot next to the build (red for failed builds). Alternately you can select any previous successful build to "roll back" to that build.
Select the Rebuild link. As this job has already been executed against stage you are simply redeploying to prod.
In the text input box labeled 'environment', change stage to prod.
Click on the 'Rebuild' button to execute the job and deploy this build to prod.
You can see what is running in prod by visiting this url. Note that changes to the prod deployment will affect the instance running in scl3. You are making a production change.
These are the settings that are not set automatically and can be optionally set in Consul under ////
- BitlyToken
- GitHubClientID
- GitHubClientSecret
- HoneyPotAPIKey
- InboundProxies
- ShadowDBName
- ShadowDBHost
- ShadowDBPort
- SSLRedirect
- LDAPCheck/
- LDAPServer (pm-ns.mozilla.org)
- LDAPSCheme (ldap)
- LDAPUser (uid=bind-bmo,ou=logins,dc=mozilla)
- LDAPPassword
- BugzillaAPIKey
- SMTP/
- SESServer
- SESUser
- SESPassword