As part of the Docs Tools Next Generation Project, the Docs Worker Pool seeks to make the build process for developers both easier and more scalable for developers.
docker build --tag=workerpool .
docker run \
--env MONGO_ATLAS_USERNAME \
--env MONGO_ATLAS_PASSWORD \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_BOT_USERNAME \
--env GITHUB_BOT_PASSWORD \
--env DB_NAME \
--env XLARGE \
--env SNOOTY_ENV \
--env FASTLY_TOKEN \
--env FASTLY_DOCHUB_MAP \
--env FASTLY_SERVICE_ID \
workerpool
MONGO_ATLAS_USERNAMEandMONGO_ATLAS_PASSWORDis username/password of atlas databaseAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYare needed for uploading to S3 via mutGITHUB_BOT_USERNAMEandGITHUB_BOT_PASSWORDare needed so builder can access private reposDB_NAMEallows the indication of a pool database (pool, pool_test)XLARGEtrue or false indicates whether this instance will run on an XLARGE server or notSNOOTY_ENVindicates whether the build environment is stage, prod, or devFASTLY_TOKENis needed for connecting to the Fastly edge dictionaryFASTLY_DOCHUB_MAPis the id of the redirect map that we publish dochub links toFASTLY_SERVICE_IDis the id of the service used for dochub
If you are running a local version of the docker image for testing, we have a separate staging environment setup. Testing in this environment is automated through the "stage" branch. Add the following env variables to the docker run command:
--env DB_NAME
cd worker
npm install --dev
npm test // runs ~ jest --detectOpenHandles --coverage
cd worker
npm install --dev
./node_modules/.bin/eslint .
See the spec doc for more details.
Development in this repository can be done via forks or branches. Currently, we support a master branch and meta branch. In general, the development workflow is to open pull requests against master, and to test master prior to creating new tags for a release.
In general, the git workflow within this repository loosely follows https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow .
meta contains various makefiles and .yaml files used for configuration.
Changes or additions to/of makefiles and .yaml for publishing purposes should be performed against this branch.
There is no general requirement to keep meta up to date with master or integration.
master is treated as a running pre-production feature branch. Changes should not go into master until properly tested for regressions in an acceptance environment. It is an expectation that hotfixes may have to occur on occasion - on such an occasion, a feature branch should be made from the commit hash of the last release tag, and not from the head of master. Master may contain changes that have yet to be fully tested for a production release.
Each release tag represents a presumptive stable release - with the most recent release tag representing the current state of our production environment.
docs-worker-pool contains various triggers for release to higher environments. Currently, the repository supports an integration environment (reflecting the state of the master branch) and a production environment (reflecting the state of the most recent release tag).
- Merge a pull request or otherwise push a commit to
masterbranch. - Verify that the deploy-integration-ec2 workflow has executed successfully.
- Rebase
masterwithintegrationand push the latest changes, or merge a pull request tomasterif performing a hotfix. - If you don't have push access, open an issue or otherwise contact a contributor with administrator priveliges.
- Create release tags. We currently follow semver standards.
- Verify that the deploy-production-ec2 workflow executed successfully for both job runs across both production instances.