Installing CKAN instances on the Windows operating system can encounter various errors.
The documentation for installation using docker-compose
was performed/tested using an Ubuntu 16.04 LTS machine, with the use of virtual machines recommended in the same.
This tutorial was tested on Ubuntu 16.04 LTS. The hosts can be local environments or cloud VMs. It is assumed that the user has direct access (via terminal / ssh) to the systems and root permissions.
In this context, this repository aims to facilitate the creation of a CKAN instances using Vagrant.
The system dependencies for this project are:
Install vagrant-env
vagrant plugin install vagrant-env
If your internet access is via proxy, install the vagrant-proxyconf
plugin:
$ vagrant plugin install vagrant-proxyconf
Create the environment variables VAGRANT_HTTP_PROXY
and VAGRANT_HTTPS_PROXY
with the value http://<user>:<password>@<host>:<port>
(replace the variables within <>
with your specific values).
Also, make sure that the environment variables http_proxy
and https_proxy
are created with the same value of http://<user>:<password>@<host>:<port>
.
While the former enables connectivity to the VM, the latter enables connectivity for Vagrant itself.
After that, clone the repository and execute the initialization:
$ git clone git@github.com:transparencia-mg/vagrant-ckan.git
$ cd vagrant-ckan
$ vagrant up
If any improvements are made to the Vagrantfile
or setup/provision_chan.sh
files, you need to run vagrant up --provision
to update the already created machine using vagrant up
.
The first execution takes a few minutes. You can log into the ckan
virtual machine using vagrant ssh ckan
.
echo "You can start the machine by running: vagrant up" echo "You can ssh to the machine by running: vagrant ssh" echo "You can stop the machine by running: vagrant halt" echo "You can delete the machine by running: vagrant destroy"
[^1]: This post explains how to install vagrant and virtualbox on linux operating systems.
Log the new created machine using vagrant ssh
and:
ckan.ini
file exists with cat /etc/ckan/default/ckan.ini
.ckan_default
user and database existes with:$ sudo -u postgres psql
\list
# The result should be sothing like:
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+--------------+----------+---------+---------+-----------------------
ckan_default | ckan_default | UTF8 | C.UTF-8 | C.UTF-8 |
postgres | postgres | UTF8 | C.UTF-8 | C.UTF-8 |