The free account is configured with a default environment whose quota matches the total of the FREE plan. This example relies on creating two environments: one to run the acceptance tests, and the other to deploy the application in production. To run this CI/CD example with a free account follow the next steps:
- Navigate to https://github.com/napptive/example-app-nodejs and fork the example to your own repository by clicking on the
Fork
icon on the top right of the GitHub page. - Generate a Personal Access Token and save the results in a secret called
PLAYGROUND_PAT
. Make sure the repository can access the value of the secret in case you are using an organization one. If you don't have a playground account, get started for free by signing up with your GitHub account. - Generate Docker Access Tokens and store the resulting values in two secrets:
DOCKER_HUB_USER
andDOCKER_HUB_TOKEN
. - Edit .github/workflows/deploy-app.yml and modify the value of
TARGET_DOCKER_REGISTRY
with your docker username. Additionally, modify the following lines so that new environments are created with a specific quota.
- name: Create test environment
uses: napptive-actions/[email protected]
with:
cmd: "env create ${{steps.envname.outputs.envname }} --cpu=0.3 --ram=1G"
playgroundConfigFile: ./config/playground.yaml
- name: Create production environment
uses: napptive-actions/[email protected]
continue-on-error: true
with:
cmd: "env create ${{steps.envname.outputs.envname }} --cpu=0.3 --ram=1G"
playgroundConfigFile: ./config/playground.yaml
- Remove your default environment so that there is no environments associated with your account. A default environment can be recreated with a reduced quota of 0.4CPU and 2G RAM.
- Commit your changes to your repository, accept the PR if you are using this approach, and check the triggered action.
- Continue on with the README.md instructions, skipping steps 1 to 5.