-
Notifications
You must be signed in to change notification settings - Fork 10
Server
We use AWS EC2 to deploy the meteor server for each environment (alpha, beta, production). We could definitely add this process to the launch tool to automate for us in the future, but for now it is a manual process.
After build, change in to the .build directory, and update the filename of the tarball generated to reflect the version and build number, as well as the git commit hash. For example, if we are at version 5.0.1, build number 20, and commit hash ae66443e75ea35b3bce6e92bc7961bf4365528a3, name the file like this
mv Holtzman.tar.gz 5.0.1-20-ae66443e75ea35b3bce6e92bc7961bf4365528a3.tar.gz
This is purely for organization and reference once we upload to AWS S3.
- Sign in to AWS console at https://aws.newspring.io
- Navigate to S3
- Navigate to
ns.ops/apollos/app/environmentwhereenvironmentisalpha,beta, orproduction - Click "Upload" in the upper left, and wait
- Right-click the tarball you just uploaded and select "Make Public"
- Navigate to EC2 Container Service in the AWS console.
- Click "guild"
- Find either
alpha-app,beta-app, orproduction-appdepending on the environment you are targeting, and click the task definition to the right that is currently associated with that service. Something likeapp:161. - Once you are on the page for that task def, click "Create new revision"
- Click "Configure via JSON"
- Find "BUNDLE_URL" and update it's value to be the name of the tarball you just uploaded.
- Click "Save"
- Click "Create"
- Remember the name of the task that was created (
app:161).
NOTE
It's important to create new task revisions from the task definition currently running on the service you wish to update. The server settings are different for each environment. So, if you wish to update alpha, create a new revision from the currently running alpha-app task definition.
- Navigate to EC2 Container Service in the AWS console.
- Click "guild"
- Click on the name of the service you wish to update
- Click "Update" in the upper right
- Change the "Task Definition" value to the one you just created
- Click "Update Service" in the bottom right
The service will create a new task and run it along side the current task. Once it determines the new task is healthy, it will kill the existing task. If it is unhealthy, it will kill the new task and keep trying until it works.