-
Fork a copy of FEC demo-apps into your personal github by clicking the "Fork" button in the top right hand corner
-
Choose your own repo to fork to
-
Clone the forked copy to your local:
git clone [email protected]:[github_handle]/demo-apps.git
- Target the sandbox and your space name:
cf target -o [sandbox_org_name] -s [space_name]
- Go into the directory where the app was cloned:
cd demo-apps/
- Push your app up to the sandbox:
cf push [app_name]
- Check to see if your app has started successfully. You should see the assigned urls to be able to check on your app in the browser:
cf apps
You can deploy your application using a CI/CD tool such as CircleCI.
-
Target the sandbox and your space name:
cf target -o [sandbox_org_name] -s [space_name]
-
Create the Cloud.gov deployer service:
cf create-service cloud-gov-service-account space-deployer [service_name]
- Create the deployer service key:
cf create-service-key [service_name] [service_name_key]
- Grab the keys:
cf service-key [service_name] [service_name_key]
-
Go to your circle project dashboard: https://app.circleci.com/projects/project-dashboard/github/[your-github-handle]
-
Click on the “Set up project” button next to your app’s repo you wish to deploy using this tool
-
Select the “Add manually” option, since we already have a .circleci/config.yml file in our forked app repo.
-
Add the necessary environment vars into your CircleCI project settings by going to your project settings https://app.circleci.com/pipelines/github/[github_handle]/demo-app. You can get the username and password variables by grabing the deployer keys
Variables include the following:
FEC_CF_ORG
FEC_CF_SPACE
FEC_CF_USERNAME_DEMO
FEC_CF_PASSWORD_DEMO
-
Go ahead and run your CircleCI build. Within the deployment process, we also incorporate autopilot, which is a zero down time deployment process.
-
After a successful deploy, you should be able to see in the circle logs the url in which the app was pushed.
You can customize app configurations by modifying the manifest.yml file. This includes customizing things like app name, route, buildpacks, and memory.