Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to the old datagov-deploy repo #1143

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

robert-bryson
Copy link
Contributor

As the datagov-deploy repo has been removed, all references are now redirected to data.gov. We should probably just have them point to data.gov instead of relying on the 301 -> 302 chain that currently happens.

This surfaced for me as I was having an issue pulling down the file postgres/locations.sql.gz in the postgres Dockerfile. Not sure why only my system was impacted by this, but probably a good fix in any case.

For some reason also a linting of that JS file.
Also, included the sql file remove/revert on purpose if we want to go that route in the future.
@@ -9,5 +9,5 @@ ARG DATASTORE_READONLY_PASSWORD

# Include extra setup scripts (eg datastore)
ADD docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
ADD https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz /docker-entrypoint-initdb.d/locations.sql.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of updating this link, I think referencing a key piece of DB setup (for dev and prod) at a historical git commit to a file that is no longer being tracked isn't good practice. Can we just add the file in the repo similar to the other files in docker-entrypoint-initdb.d folder?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to that

Copy link
Contributor

@btylerburton btylerburton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for rewiring up the links. It would be equally valuable to delete/update outdated instructions.

README.md Outdated Show resolved Hide resolved
ckan/setup/gunicorn.conf.py Outdated Show resolved Hide resolved
@@ -9,5 +9,5 @@ ARG DATASTORE_READONLY_PASSWORD

# Include extra setup scripts (eg datastore)
ADD docker-entrypoint-initdb.d /docker-entrypoint-initdb.d
ADD https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz /docker-entrypoint-initdb.d/locations.sql.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to that

solr/Dockerfile Outdated Show resolved Hide resolved
solr/Dockerfile Outdated Show resolved Hide resolved
The locations table [was defined in 2016](https://github.com/GSA/datagov-deploy/search?q=location+table&type=commits).
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/datagov-deploy/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz).
The locations table [was defined in 2016](https://github.com/GSA/data.gov/search?q=location+table&type=commits).
This table was deleted from the repo but is still available from old commits: [locations.sql.gz](https://github.com/GSA/data.gov/raw/71936f004be1882a506362670b82c710c64ef796/ansible/roles/software/ec2/ansible/files/locations.sql.gz).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is outdated now that the table is in the docker-entrypoint dir.

echo "*** USAGE: $(basename "$0") HOST DB_NAME DB_USER PASS"

DEST_FOLDER=/tmp
# TODO check path on run
SQL_FILE=30_locations.sql.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm almost positive the pathing needs to be adjusted

gunzip -c ${SQL_FILE} | PGPASSWORD=${PASS} psql -h "$HOST" -U "$DB_USER" -d "$DB_NAME" -v ON_ERROR_STOP=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my understanding was putting the .gzipped file in the docker-entrypoint dir executes it automatically when catalog starts up... is that correct?

and if so, what does this script here do?

@btylerburton
Copy link
Contributor

What do we need to do to get this merged @robert-bryson?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants