Webmaker/Deployment: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
Line 3: Line 3:
Deploying apps to webmaker.org is relatively painless, involving the following steps:
Deploying apps to webmaker.org is relatively painless, involving the following steps:


# Increment package.json and tag a new version. This is done by fetching the latest master and running <code>npm version patch -m '[app] v%s'</code>, replacing [app] with the application name. The v%s is intentional, you actually want to use that string. As an example, to tag thimble the command would be <code>npm version patch -m 'thimble v%s'</code>.
# Increment package.json and tag a new version automatically by checking out the master branch, updating it to current master (<code>git pull mozilla master</code> after changing branches) and running <code>npm version patch</code>. This will both update the package.json version and create a git tag of the form "v1.2.3"
# Push this new commit to the mozilla/master repo ("mozilla" represents the upstream repo name here, if you use a different name, make sure to use that in the following command, too). This is done by running <code>git push mozilla master --tags</code> to push both the new commit and the new tag.
# Push this new commit to the mozilla/master repo ("mozilla" represents the upstream repo name here, if you use a different name, make sure to use that in the following command, too). This is done by running <code>git push mozilla master --tags</code> to push both the new commit and the new tag.
# Start a jenkins build. This is done by:
# Start a jenkins build. This is done by:
## Visiting http://jenkins.mofoprod.net:8080/
## Visiting http://jenkins.mofoprod.net:8080/
## logging in (get a user account from JP)
## logging in (get a user account if you don't have one by asking JP)
## visiting the project page for the thing you want to build
## visiting the project page for the thing you want to build
## click the "Build now" button on the left sidebar
## click the "Build now" button on the left sidebar
## Fill in the tag you want to build
## Fill in the tag you want to build. If the <code>npm version patch</code> generated "v1.2.3", for instance, then fill in "v1.2.3".
## Wait
## Hit the build button. You are now done.
# If you need to make any configuration changes (a new parameter, or you need to change an existing) ask JP or I to make them so.
# If your update requires any configuration changes (a new parameter, or you need to change an existing one) ask any of the webmaker team members with S3 access to update those values for you.
# Watch your thing be deployed on [app].mofostaging.net
# When building the app for staging, the app will (typically) be deployed on [app].mofostaging.net
# When building the app for deployment, the app will (typically) be deployed on [app].webmaker.org
# You can verify the deployment succeeded outside of Jenkins by visiting the deployed app's website and checking the output for the <code>/healthcheck</code> URL, which should tell you the app version (and possibly additional module information)
 
Note that some apps automatically build themselves to their staging location if code is merged into the development branch. Right now those are Popcorn and Appmaker. These only require building if you need to update the production versions.

Latest revision as of 18:00, 9 October 2014

Deploying apps on webmaker.org

Deploying apps to webmaker.org is relatively painless, involving the following steps:

  1. Increment package.json and tag a new version automatically by checking out the master branch, updating it to current master (git pull mozilla master after changing branches) and running npm version patch. This will both update the package.json version and create a git tag of the form "v1.2.3"
  2. Push this new commit to the mozilla/master repo ("mozilla" represents the upstream repo name here, if you use a different name, make sure to use that in the following command, too). This is done by running git push mozilla master --tags to push both the new commit and the new tag.
  3. Start a jenkins build. This is done by:
    1. Visiting http://jenkins.mofoprod.net:8080/
    2. logging in (get a user account if you don't have one by asking JP)
    3. visiting the project page for the thing you want to build
    4. click the "Build now" button on the left sidebar
    5. Fill in the tag you want to build. If the npm version patch generated "v1.2.3", for instance, then fill in "v1.2.3".
    6. Hit the build button. You are now done.
  4. If your update requires any configuration changes (a new parameter, or you need to change an existing one) ask any of the webmaker team members with S3 access to update those values for you.
  5. When building the app for staging, the app will (typically) be deployed on [app].mofostaging.net
  6. When building the app for deployment, the app will (typically) be deployed on [app].webmaker.org
  7. You can verify the deployment succeeded outside of Jenkins by visiting the deployed app's website and checking the output for the /healthcheck URL, which should tell you the app version (and possibly additional module information)

Note that some apps automatically build themselves to their staging location if code is merged into the development branch. Right now those are Popcorn and Appmaker. These only require building if you need to update the production versions.