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

OCL - Various tweaks for production on AWS & certbot additions #14

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

wcmoosa
Copy link

@wcmoosa wcmoosa commented Jan 11, 2021

No description provided.

wcmoosa and others added 6 commits May 5, 2020 13:42
Tweaked the default.conf
Added home path in ubuntu user folder for production
Docker run for nginx and mounting the ssl certs
Create sysadmin admin added bash script
Copy link
Collaborator

@Gordonei Gordonei left a comment

Choose a reason for hiding this comment

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

Looks good!

I'm going to do a commit or two against this branch, and we'll look to get it merged once our new external CKAN is up.

Dockerfile Show resolved Hide resolved

# Collaborators extension
RUN ckan-pip install git+https://github.com/okfn/[email protected]
#RUN ckan-pip install git+https://github.com/okfn/ckanext-collaborators.git
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can go if we're getting dataset level permissions in 2.9

bin/run_ckan.sh Show resolved Hide resolved
bin/run_ckan.sh Show resolved Hide resolved
bin/run_ckan.sh Outdated
#docker exec ckan /usr/local/bin/ckan-paster --plugin=ckanext-collaborators collaborators init-db -c /etc/ckan/production.ini

# Create Sysadmin
docker exec -it ckan /usr/local/bin/ckan-paster --plugin=ckan sysadmin -c /etc/ckan/production.ini add johndoe
Copy link
Collaborator

Choose a reason for hiding this comment

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

johndoe -> ckan_admin?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, got that off the CKAN docs


# sudo certbot certonly --standalone -d <FQDN e.g. data.demo.com>
docker run -d --restart always -v /etc/letsencrypt:/etc/nginx/certs:z -v /home/ubuntu/Data-Portal/config/default.conf:/etc/nginx/conf.d/default.conf --network ckan --name ckan-proxy -p 443:443 -p 80:80 nginx
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not keen for the gateway proxy to live in the CKAN setup script, mostly for security reasons.

Ideally, we would spin up ckan, run some sort of local readiness test, then run proxy setup script. Will you please move proxy setup into its own script, please

@@ -6,7 +6,7 @@ server {
}

server {
server_name ckan.arbidata.com;
server_name cct.opencitieslab.org;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we might have to look at some templating for this file, and the production.ini one - you can do some rudimentary stuff with SED, or go a little fancier with a jinja based setup.

Any preference?

@@ -57,7 +57,7 @@ ckan.datastore.default_fts_index_method = gist

## Site Settings

ckan.root_path = /data-catalogue/{{LANG}}
#ckan.root_path = /home/ubuntu/ckan/{{LANG}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

See earlier comment about potential for templating

@Gordonei
Copy link
Collaborator

I've borrowed quite liberally from this branch, and addressed some of my concerns above in wip/docker-s3.

Might be an idea to rebase against it, sort out the merge conflicts, and see where you are after that?

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.

2 participants