Skip to content

Remove references to the old datagov-deploy repo#1143

Open
robert-bryson wants to merge 14 commits intomainfrom
feature/datagov-deploy-refactor
Open

Remove references to the old datagov-deploy repo#1143
robert-bryson wants to merge 14 commits intomainfrom
feature/datagov-deploy-refactor

Conversation

@robert-bryson
Copy link
Copy Markdown
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.
Comment thread postgresql/Dockerfile

# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread README.md Outdated
Comment thread ckan/setup/gunicorn.conf.py Outdated
Comment thread postgresql/Dockerfile

# 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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 to that

Comment thread solr/Dockerfile Outdated
Comment thread solr/Dockerfile Outdated
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
Copy Markdown
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.


DEST_FOLDER=/tmp
# TODO check path on run
SQL_FILE=30_locations.sql.gz
Copy link
Copy Markdown
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


echo "Cleaning"
rm -f $DEST_FOLDER/locations.sql.gz No newline at end of file
gunzip -c ${SQL_FILE} | PGPASSWORD=${PASS} psql -h "$HOST" -U "$DB_USER" -d "$DB_NAME" -v ON_ERROR_STOP=1
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@btylerburton
Copy link
Copy Markdown
Contributor

@Bagesary here's another one to discuss with @robert-bryson

@Bagesary
Copy link
Copy Markdown

@Bagesary here's another one to discuss with @robert-bryson

@jbrown-xentity could you please talk to Robert on Monday on this ticket?

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.

4 participants