Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Nubis Deployment for bugzilla.mozilla.org

License

Notifications You must be signed in to change notification settings

mozilla-bteam/bmo-nubis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bugzilla.mozilla.org

This is a nubis deployment repository for BMO (bugzilla.mozilla.org)

Prerequisites

If you are new to the Nubisproject you will need to set up some prerequisites.

Layout

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.

Upgrading the platform

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

Updating the deployment is accomplished by following a normal git work-flow:

  1. Checkout the deployment repository
  2. Initilize the application code submodule
  3. Make necessary changes
  4. Check deployment code into github
  5. Test deployment in stage
  6. Deploy the code into production

Updating the application

Fortunately, updating the application code is exactly the same as updating the deployment code with one notable exception:

  1. Checkout the deployment repository
  2. Initialize the application code submodule
  3. Make necessary changes
  4. Check deployment code into github
  5. Test deployment in stage
  6. Deploy the code into production

Checkout the deployment repository

You will want to grab the latest code

git clone [email protected]:gozer/bugzilla.mozilla.org.git

Initialize the application code submodule

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

Make necessary changes

If you need to make any changes to the deployment code (EC2 instances, RDS, etc...) you do that here.

Check deployment code into GitHub

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)

Test deployment in stage

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.

Deploy the code into production

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 ...

Login to Jenkins

Start by visiting the Jenkins URL and then log in.

Jenkins Login

Authorize GitHub Authentication

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).

Jenkins GitHub Authorization

bugzilla-deployment

In Jenkins click on the 'bugzilla-deployment' link to go to the deployment job.

Jenkins Bugzilla Deployment

Latest Successful Build

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.

Jenkins Latest Successful Build

Rebuild

Select the Rebuild link. As this job has already been executed against stage you are simply redeploying to prod.

Jenkins Latest Successful Build Rebuild

Stage -> Prod

In the text input box labeled 'environment', change stage to prod.

Jenkins Latest Successful Build Rebuild Stage

Execute Rebuild

Click on the 'Rebuild' button to execute the job and deploy this build to prod.

Jenkins Latest Successful Build Rebuild Prod

Test 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.

Confd settings

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

About

Nubis Deployment for bugzilla.mozilla.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 30.6%
  • Puppet 26.7%
  • HCL 21.0%
  • Shell 20.2%
  • Ruby 1.5%