Commit Graph

59 Commits

Author SHA1 Message Date
dandds
7949c64b9b Initial set up for Ghost Inspector integration tests.
Adds a CircleCI integration for Ghost Inspector
(https://ghostinspector.com), a headless browser testing SaaS. The
README is updated with details about how to run GI locally.

Removes the bootstrap setup for Selenium testing with BrowserStack.
2019-10-14 16:32:38 -04:00
dandds
67ff70201e Add beat worker to the deployment.
We will run a separate pod for the beat worker. There should only ever
be a single beat worker (to avoid redundant work) so the number of
replicas needs to be managed independently.

This adds both the Kubernetes config for the new pod and additional
CircleCI config to swap a new image into the pod during CD.
2019-09-18 16:34:56 -04:00
dandds
78948797a8 Add prefix to Docker image tags.
With a prefix, it is easier to automatically sort and expire images
within the container registry.
2019-09-11 15:48:12 -04:00
dandds
ace222fe95 Push multiple Docker tags for image in CD.
This will allow Kubernetes resources that only pull images occasionally
(i.e., k8s jobs) to point to a static tag name, "latest", that is updated
regularly. It also means we can refer to that image in the k8s config
tracked in the repo, instead of out-of-date images.
2019-09-11 15:37:09 -04:00
dandds
485f578c78 Apply config changes for CSP file uploads.
This applies configuration changes for the Flask app and adds changes to
the Dockerfile so that the build can make a CSP-specific JS bundle. It
adds `write_dotenv` script that creates the appropriate `.env` file for
the `parcel` bundler depending on how the `CSP` environment variable is
set.

- Configure K8s environment variables for Flask CSP usage
- Supply default CSP config setting to Flask app
- Declare the CSP arg in the Dockerfile
- Supply extra Docker build args to CD
- Fix top-level reference to boto3 in file_upload module
- Add back missing sample NGINX config for docker-compose build
2019-08-09 08:05:20 -04:00
dandds
f3e032fc03 Finalize CD config and add k8s job for migrations.
Add CircleCI config for both CSPs to:
- build the Docker image and push it to the registry
- run a short-lived k8s job to apply migrations and see data
- update the images for the Flask pods and rq worker pods
2019-07-31 11:58:43 -04:00
dandds
4c70d59c5d Add k8s networking.
- bind static azure IPs
- Add load balancers for both CSPs
2019-07-31 11:58:08 -04:00
dandds
d056191b01 Working config for CD.
This adds the AWS and Azure CircleCI orbs for updating container images
in a cluster. It installs the clients for both CSPs, configures kubectl
with a programmatic user's auth information, and executes a `kubectl set
image` command to reset the cluster image to the one that was just
pushed to the container registry.
2019-07-31 11:58:08 -04:00
dandds
89852346f8 Push images to CSP registries during CD.
Add config (CircleCI Orb recipes) for building Docker images and pushing
the results to both AWS and Azure Docker registries.
2019-07-16 15:47:50 -04:00
dandds
6abbf4bac0 Upgrade Python to 3.7.3 and add PyYAML.
We should try and track mainline Python as much as possible.

PyYAML was a sub-dependency of a dev dependency but was being included
in the translations utility. Bundling only the production Python
dependencies was not working because of this.
2019-06-20 06:26:08 -04:00
dandds
99abf011d7 Remove CircleCI cache for now 2019-06-10 11:25:00 -04:00
dandds
b7b07ce89c Simpler CircleCI config for CI.
This relies on a CircleCI-supplied base image and removes CD for now.
2019-06-10 10:48:59 -04:00
dandds
75e863c671 update docker registry domain 2019-04-15 10:55:34 -04:00
dandds
c534ceda59 remove CRL caching from CircleCI config 2019-02-27 05:51:50 -05:00
dandds
725042ab76 modify crl storage config:
- make local container for libcloud storage if it does not exist
- separate config variables for CRL storage
2019-02-27 05:51:50 -05:00
Devon Mackay
ed418b61ba Pull the manifest for the newly pushed image 2019-01-17 12:51:49 -05:00
Devon Mackay
6dae283805 Dissuade docker push fomr using dynamicy output 2019-01-17 12:49:43 -05:00
Patrick Smith
88339e9d36 Use updated pip when building on CircleCI 2018-12-14 10:39:15 -05:00
dandds
f3c294659a refine test environment sample data script, add k8s role and role binding for updating sample data 2018-12-04 16:12:23 -05:00
dandds
bd0b7b9dcd script for rotating sample data on test env 2018-12-04 09:42:47 -05:00
dandds
bbeef23c45 test testing build 2018-12-03 16:34:39 -05:00
dandds
b54e3147c3 try scheduling nightly deploys for test env with CircleCI config 2018-12-03 09:11:25 -05:00
Patrick Smith
be632e0d4a Drop -circleci from generated image names 2018-10-25 15:58:09 -04:00
dandds
60cc49275b update circle ci build config 2018-10-24 11:21:22 -04:00
Patrick Smith
1f07b0fa33 Revert "Deploy this branch"
This reverts commit 2e4a8520a9. `master`
will now be deployed.
2018-10-15 16:04:19 -04:00
Patrick Smith
0f658d5036 Add build step to generate build info 2018-10-15 16:02:35 -04:00
Patrick Smith
2e4a8520a9 Deploy this branch 2018-10-15 15:04:58 -04:00
Devon Mackay
b077ad9bac Make circleci image name unique 2018-10-15 14:48:03 -04:00
Devon Mackay
d52e92fddf Convert to only deploying master branch 2018-10-15 14:48:02 -04:00
Devon Mackay
f684990666 Set working directory to match final app location (fix venv issue) 2018-10-15 14:48:02 -04:00
Devon Mackay
43057e2fc0 Flush CRL cache 2018-10-15 14:48:02 -04:00
Devon Mackay
f6fdb44a87 Ensure permissions are preserved 2018-10-15 14:48:02 -04:00
Devon Mackay
1a68458a12 And also include /usr/bin, since the bin stubs for pip installed packages live there 2018-10-15 14:48:02 -04:00
Devon Mackay
82517e67d7 Fix site-packages reference 2018-10-15 14:48:02 -04:00
Devon Mackay
38c86362b0 Ensure system packages get copied to prod container 2018-10-15 14:48:02 -04:00
Devon Mackay
28d5544cef Add GIT_SHA env var for use by atst-update-deploy.sh 2018-10-15 14:48:02 -04:00
Devon Mackay
3c5ee0b65d Toggle CD on for the circleci-cd branch for testing 2018-10-15 14:48:02 -04:00
Devon Mackay
771db0dfdd Update image name 2018-10-15 14:48:02 -04:00
Devon Mackay
a9bdf45ac6 Finalize deploy and switch to master branch only 2018-10-15 14:48:02 -04:00
Devon Mackay
bbea6d66b5 Variablize image name 2018-10-15 14:48:02 -04:00
Devon Mackay
a07cc6d524 Fix syntax 2018-10-15 14:48:02 -04:00
Devon Mackay
b72269bf21 Change var name to match deploy script 2018-10-15 14:48:02 -04:00
Devon Mackay
d0cc4da9f0 Add deploy stage to the build 2018-10-15 14:48:02 -04:00
Devon Mackay
2ec2a22db0 Remove IMAGE_NAME output since it does not work properly 2018-10-15 14:48:02 -04:00
Devon Mackay
db522a2913 Add image building and pushing stage 2018-10-15 14:48:02 -04:00
Devon Mackay
d77383ad9a Convert to using workslow with separate jobs
- Split build into app_setup and test jobs
- Add workflow sequence info
- Add DB reset to cibuild since it uses a fresh DB in a new build stage
2018-10-15 14:48:02 -04:00
Devon Mackay
26a83df444 Add default re-usable config bits 2018-10-15 14:48:02 -04:00
Devon Mackay
28a27c518a Enable venv caching 2018-08-30 18:39:29 -04:00
Devon Mackay
eaf9a90c06 Remove unused vars 2018-08-30 18:38:34 -04:00
Devon Mackay
e486d9f53b Fix var name 2018-08-30 17:58:21 -04:00