You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Configure an AWS profile with `aws configure --profile gophillygo` if you haven't already
39
-
1. Make a production group_vars file (similarly to how is described above with development). Make sure production is set to true, and also specify an app_username, which should be set to: ubuntu
40
-
2. If building the `otp` machine, make sure the latest GTFS are in `otp_data`, then build a graph when them in the development environment provisioning. This will result in a new `Graph.obj` file being written to `otp_data`.
41
-
3. Install the deployment dependencies, ideally in a virtualenv: `python3 -m venv .venv && source .venv/bin/activate && pip install -r python/cac_tripplanner/deployment_requirements.txt`
42
-
4. Build AMIs by running (within the virtualenv): `AWS_PROFILE=gophillygo deployment/cac-stack.py create-ami`
43
-
5. The previous command builds all AMIs. To only build a single AMI, run the same command, but also specify the `--machine-type` parameter, which may be set to one of: `bastion`, `otp`, or `app`.
44
-
45
-
46
-
Launching AWS Stacks
35
+
Production Deployment
47
36
------------------------
48
-
1. Copy `deployment/default_template.yaml` to `deployment/default.yaml` and edit variables
49
-
1. Configure an AWS profile with `aws configure --profile gophillygo` if you haven't already
50
-
1. Create a virtualenv with the deployment dependencies if you haven't already (see Building AMIs, above).
51
-
2. In the project directory, for a set of `Blue` stacks in the `Production` environment, run: `AWS_PROFILE=gophillygo deployment/cac-stack.py launch-stacks --stack-color blue --stack-type prod`
52
-
3. The previous command will do the following:
53
-
* Ensure the `VPC` stack is up in Production -- it will be launched if it isn't already running
54
-
* Ensure the `DataPlane` stack is up in Production -- it will be launched if it isn't already running
55
-
* Ensure the `OtpServer` Blue stack is up in Production -- it will be launched if it isn't already running
56
-
* Ensure the `WebServer` Blue stack is up in Production -- it will be launched if it isn't already running
57
-
4. Note that database migrations are not automatically run. When the DataPlane is first brought up, it is necessary to manually create the app user/db and run migrations.
58
-
5. Launching a set of Production stacks with the other color (`Green`), will use the same `VPC` and `DataPlane` stacks, but will create different `OtpServer` and `WebServer` stacks (if they don't already exist).
59
-
60
-
61
-
Production Blue/Green deployment
62
-
--------------------------------
63
-
1. Note which color is currently running in production. Use the opposite color in the following steps.
64
-
2. Set `otp_host` in production group_vars to the CloudFront distribution with the desired color.
65
-
3. Run `create_ami` command to build new AMIs.
66
-
4. Update `default.yaml` with new AMI ids.
67
-
5. Run `launch_stacks` command to launch stacks with the desired color.
68
-
6. Test new stacks thoroughly.
69
-
7. Switch the public DNS record of the site to point to the new `WebServer` ELB DNS.
70
-
8. The stacks of the previous color may be deleted when ready.
37
+
*Note there is no staging environment*
38
+
1. Dispatch "Build Graph" Github Actions workflow
39
+
- This will fetch and process the latest GTFS and OSM files, store them on S3, and then use those files (along with the elevation file) to build a new Graph.obj for the OTP builder. New Graph.obj will also be stored in S3 bucket.
40
+
2. Once workflow completes (3-4 hours), remove everything from your local `otp_data` directory and then run the following script to pull the latest Graph.obj: `scripts/download-latest-graph.sh`
41
+
3. Build the AMIs, follow latest instructions in `Building The AMIs` section of deployment instrucions, [found here](https://github.com/azavea/geospatial-apps/blob/master/gophillygo_deployment.md#building-the-amis).
42
+
4. Once AMI builds complete and identifiers set, following latest instructions in `Deploying the AMIs` section of deployment instructions, [found here](https://github.com/azavea/geospatial-apps/blob/master/gophillygo_deployment.md#deploying-the-amis).
0 commit comments