Skip to content

Commit

Permalink
Rename arcdata to dcsops everywhere
Browse files Browse the repository at this point in the history
This is a long time coming
  • Loading branch information
Frank Duncan committed Feb 21, 2021
1 parent ec6dd41 commit 912e8e0
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_install:
- sudo apt-get update
- sudo apt-get install g++ qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
before_script:
- psql -c 'create database "arcdata-test";' -U postgres
- psql -c 'create database "dcsops-test";' -U postgres
- bundle exec rake bootstrap:db_config db:test:prepare
script: xvfb-run bundle exec rspec spec
env:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Please note that we expect all participants to abide by the project
## Submitting and Reviewing Code

The DCSOps home repository is
[GitHub](https://github.com/redcross/arcdata). Please submit [pull
[GitHub](https://github.com/redcross/dcsops). Please submit [pull
requests](https://help.github.com/articles/about-pull-requests/) (PRs)
there.

Expand Down Expand Up @@ -149,7 +149,7 @@ In order to make sure the two are in line, you can add the heroku branch to your
git checkout (after running `heroku login`)

```
$ git remote add heroku-production https://git.heroku.com/arcdata.git
$ git remote add heroku-production https://git.heroku.com/dcsops.git
$ git fetch heroku-production
```

Expand All @@ -162,7 +162,7 @@ This branch is synced up with the current deployed staging heroku branch.
As above, to make sure the two are aligned, you can do:

```
$ git remote add heroku-staging https://git.heroku.com/arcdata-staging.git
$ git remote add heroku-staging https://git.heroku.com/dcsops-staging.git
$ git fetch heroku-staging
```

Expand Down Expand Up @@ -275,7 +275,7 @@ without raising it for discussion.
## For more project management information, see the wiki.

See the [DCSOps Development
Wiki](https://github.com/redcross/arcdata/wiki) for more information
Wiki](https://github.com/redcross/dcsops/wiki) for more information
about how we run the project, records of meetings and decisions, etc.

## Thank you!
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
ruby "2.6.6"
#ruby-gemset=arcdata
#ruby-gemset=dcsops

# The following are from the default generated Gemfile for a new Rails 5.2 app:

Expand Down
20 changes: 10 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ $ rake

## Deployment

There are two branches for deployment 'production' and 'candidate-production'. The former is for the arcdata app on heroku, and the latter is for the arcdata-staging app. Generally, 'production' and 'main' are in step, but there's times when main is more in step with 'candidate-production.'
There are two branches for deployment 'production' and 'candidate-production'. The former is for the dcsops app on heroku, and the latter is for the dcsops-staging app. Generally, 'production' and 'main' are in step, but there's times when main is more in step with 'candidate-production.'

DCSOps is deployed on Heroku, so you'll need a Heroku account and collaborator access granted to do anything with the production instance.

Expand All @@ -119,7 +119,7 @@ $ brew install heroku/brew/heroku
To interact with the app from the command line, set up git remote to it:

```bash
$ heroku git:remote --app arcdata # or arcdata-staging for staging
$ heroku git:remote --app dcsops # or dcsops-staging for staging
```

At this point, you will want to rename the heroku remote to something more descriptive, so that you can have a staging and production remote in your local git instance.
Expand All @@ -133,7 +133,7 @@ Then you can push to it. Database migrations are not run automatically, so don't
```bash
$ git push heroku-production production:main
$ # Or git push heroku-staging candidate-production:main
$ heroku run rake db:migrate --app arcadata # Or --app arcdata-staging
$ heroku run rake db:migrate --app arcadata # Or --app dcsops-staging
```

**IMPORTANT:** Once you have finished a new deployment, please log it in `site-updates.txt`.
Expand Down Expand Up @@ -200,15 +200,15 @@ Direct Line is a call center service used by some of the regions in DCSOps. It s

## Staging Site Setup

We have a staging instance setup at `arcdata-staging` for testing out updates before they're pushed into production. It uses a different database (pulled from production backups), doesn't send emails or text messages, and doesn't contact any external services where changes are made including SQS for the Volunteer Connection import or S3. Delayed job tasks are run every hour until they are completed with `rake jobs:workoff` on a Heroku Scheduler dyno.
We have a staging instance setup at `dcsops-staging` for testing out updates before they're pushed into production. It uses a different database (pulled from production backups), doesn't send emails or text messages, and doesn't contact any external services where changes are made including SQS for the Volunteer Connection import or S3. Delayed job tasks are run every hour until they are completed with `rake jobs:workoff` on a Heroku Scheduler dyno.

In order to update the staging database with a more recent copy of the production database, we have a rake task that downloads a production backup, loads it into a local temporary database, removes unneeded records (to reduce the size of the staging DB), and replaces the Heroku staging database with the modified local data. It can be run with:

```bash
$ rake staging:update_staging_db
```

**Note**: Downloading the production backup and pushing the local data to staging can take some time, but user input is required to confirm the overwriting of the `arcdata-staging` database. This is left in as an extra precaution against accidentally deleting production data.
**Note**: Downloading the production backup and pushing the local data to staging can take some time, but user input is required to confirm the overwriting of the `dcsops-staging` database. This is left in as an extra precaution against accidentally deleting production data.

## Database Management

Expand All @@ -217,19 +217,19 @@ Heroku Postgres is being used for the PostgreSQL database, so backups and creden
We run daily automated backups on Heroku. To schedule automated backups and verify that they are running, you can run the following commands, specifying a 24-hour time and time zone for backups to take be created (with more detail in the [documentation](https://devcenter.heroku.com/articles/heroku-postgres-backups#scheduling-backups)):

```bash
$ heroku pg:backups:schedule DATABASE_URL --at '02:00 America/Chicago' --app arcdata
$ heroku pg:backups --app arcdata
$ heroku pg:backups:schedule DATABASE_URL --at '02:00 America/Chicago' --app dcsops
$ heroku pg:backups --app dcsops
```

To create and then download a backup manually, you'll need to run:

```bash
$ heroku pg:backups:capture --app arcdata
$ heroku pg:backups:download --app arcdata
$ heroku pg:backups:capture --app dcsops
$ heroku pg:backups:download --app dcsops
```

Credentials are also managed through the CLI rather than directly through Postgres itself. You can specify usernames for new database credentials, but passwords are always automatically created by Heroku. Databases running earlier versions of Postgres (~9.3) don't support the [full set of commands and functionality](https://devcenter.heroku.com/articles/heroku-postgresql-credentials), but you can reset the database credentials with:

```bash
$ heroku pg:credentials <DATABASE_NAME> --reset --app arcdata
$ heroku pg:credentials <DATABASE_NAME> --reset --app dcsops
```
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# DCSOps ("Disaster Cycle Services Operations")

Current build status: [![Build Status](https://travis-ci.org/redcross/arcdata.svg?branch=main)](https://travis-ci.org/redcross/arcdata) [![Coverage Status](https://coveralls.io/repos/github/redcross/arcdata/badge.svg?branch=main)](https://coveralls.io/github/redcross/arcdata?branch=main)
Current build status: [![Build Status](https://travis-ci.org/redcross/dcsops.svg?branch=main)](https://travis-ci.org/redcross/dcsops) [![Coverage Status](https://coveralls.io/repos/github/redcross/dcsops/badge.svg?branch=main)](https://coveralls.io/github/redcross/dcsops?branch=main)

DCSOps (a.k.a. ARCData) is an open source application for managing some Red Cross Disaster Services processes, such as Disaster Action Team (DAT) shifts. The production instance is at [DCSOps.org](https://dcsops.org/).
DCSOps is an open source application for managing some Red Cross Disaster Services processes, such as Disaster Action Team (DAT) shifts. The production instance is at [DCSOps.org](https://dcsops.org/).

## Installation

Expand All @@ -14,7 +14,7 @@ You can communicate with the other developers by posting to the
[DCSOps discussion
forum](https://groups.google.com/forum/#!forum/dcsops-dev) (which is a
Google Group), or by filing / commenting in the [issue
tracker](https://github.com/redcross/arcdata/issues). Both of these
tracker](https://github.com/redcross/dcsops/issues). Both of these
forums are browseable without logging in, but you'll need to have,
respectively, a Google or GitHub account to post. Creating an account
is free of charge.
Expand Down
4 changes: 2 additions & 2 deletions config/database.yml.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
development:
adapter: postgresql
database: arcdata-dev
database: dcsops-dev
username: postgres
pool: 5
timeout: 5000
Expand All @@ -10,6 +10,6 @@ development:
# Do not set this db to the same as development or production.
test:
adapter: postgresql
database: arcdata-test
database: dcsops-test
pool: 5
timeout: 5000
4 changes: 2 additions & 2 deletions lib/tasks/staging.rake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace :staging do
TEMP_DB_NAME = "temp_staging_db"
STAGING_APP = "arcdata-staging"
STAGING_APP = "dcsops-staging"

task :copy_prod_db => :environment do
puts "Downloading prod database backup"
`dropdb --if-exists #{TEMP_DB_NAME}`
`createdb -O #{ActiveRecord::Base.connection_config[:username]} #{TEMP_DB_NAME}`
`heroku pg:backups:download -a arcdata`
`heroku pg:backups:download -a dcsops`
puts "Loading prod database backup into local temp database"
`pg_restore -U #{ActiveRecord::Base.connection_config[:username]} -O -d #{TEMP_DB_NAME} latest.dump`
`rm latest.dump`
Expand Down
Empty file removed log/.keep
Empty file.
2 changes: 1 addition & 1 deletion public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>DCSOps - Oh No! (500)</title></head>
</head>
<body>
<iframe src="http://redcross.github.io/arcdata/error-500.html">
<iframe src="http://redcross.github.io/dcsops/error-500.html">
<p>We hit a snag... The administrators have been notified and we are working as fast as possible on a fix. Please try again in a few minutes. Contact your DAT Administrator or supervisor if you have any questions about the DCSOps system.</p>
</iframe>
</body>
Expand Down

0 comments on commit 912e8e0

Please sign in to comment.