Live at https://cap.18f.gov.
18F's deployments of C2 live in AWS, and are deployed via Cloud Foundry. See the 18F Cloud Foundry documentation for more details on how to inspect and configure them.
Once you're set up with Cloud Foundry, open a new issue in the DevOps repo to ask for access to the "cap" organization. Include your GSA email address in the request.
Within Cloud Foundry, our application environments are organized like so:
organization: cap
|
+ – space: general
|
+ – apps:
|
+ – c2-dev
+ - c2-staging
+ - c2-prod
- Check out the commit you want to deploy.
- Run
git status
and ensure that you have a clean working directory. - If your deploy has a destructive migration,
- Take a snapshot of the database.
- Note that you may see exceptions if doing a zero-downtime deployment, as the old copies of the application are expecting the old data format.
- Install cf-blue-green v0.2.1+.
- Run
cf target -o cap -s general
. - Deploy the application
- If you want to do an official "release" to production, run
./script/release
, which will:- Tag the release.
- Do a zero-downtime deployment to the
c2-prod
application in Cloud Foundry. - Push the tag to the repository on GitHub.
- If you want to do a zero-downtime deployment to another environment, run
./script/deploy <appname>
.
- If you want to do an official "release" to production, run
We use Mandrill for sending transactional emails.
- Create a MailChimp account.
- Ask to be added to the MailChimp account.
- Open an issue in the devops repo. Include the GSA email address you used to sign up for Mailchimp.
- Assign the issue to @afeld.
- Log in to MailChimp.
- If you have multiple options, select the "General Services Administration | 18F" account.
- Click "Reports".
- Click "View Mandrill Reports".
You should now be signed in to Mandrill with the shared account.
18F developers can give admin access to users in the system. Here is an example:
# on localhost
% cd /tmp
% git checkout [email protected]:18F/C2.git
% cd C2
% script/cssh c2-prod
vcap@someinstance:~$ rails console
Loading production environment (Rails 4.2.4)
irb(main):001:0> u = User.find_by_email_address '[email protected]'
irb(main):002:0> u.add_role('admin')
irb(main):003:0> u.save!
^D
vcap@someinstance:~$ exit
All application logs are stored via https://logs.cloud.gov/.
Logs are searchable via the Kibana UI, and are retained for 180 days.