More detailed documentation is available in Confluence
It is recommended that if your host is Windows or Mac, the installation will be done in a Virtual Machine
- Create a Ubuntu VM
- Install SSH Server
sudo apt install openssh-client
sudo apt install openssh-server
- Install Docker by following instructions in https://docs.docker.com/engine/install/ubuntu/
- Install pipenv by following instructions in https://pipenv.pypa.io/en/latest/install/
- Set up SSH port forwarding for your VM by accessing Machine → Settings → Network → Adapter 1 → Advanced → Port Forwarding and adding the following entry:
Name | Protocol | Host IP | Host Port | Guest IP | Guest Port |
---|---|---|---|---|---|
SSH | TCP | 127.0.01 | 2222 | 10.0.0.2.15 | 22 |
Guest IP can be retrieved by running ip addr show
in the VM.
For Azure deployment, we use Python3.11 and a different set of requirements. To use this set the PIPENV_PIPFILE
env var to azure/Pipfile
before running the following steps. Locally or for AWS, just do the following:
pipenv sync
pipenv shell
ansible-galaxy install -r roles/requirements.yml --force
# (on first run only)
- use inventory template from ./inventory/local_dev_example as a base for your own inventory file (instructions inside)
- Setup requires root privileges for Minikube installation, if your account requires password on
sudo
then add "-K" after the "setup" string (it's going to ask for your password) ansible-playbook -i inventory/local_dev setup_local_dev.yml -t setup
ansible-playbook -i inventory/local_dev deploy_ckan.yml -t deploy
An IP of Minikube cluster will get added to /etc/hosts at the end of execution of setup_local_dev playbook.
minikube profile list
Default profile is set during setup_local_dev playbook execution. With multiple profiles present, if you want to switch first list available profiles, and then select the new default
minikube profile _profile_name
minikube dashboard
or when running minikube inside a VM (requires some kind of proxy, e.g. FoxyProxy and ssh socks proxy tunnel)
minikube dashboard --url
If you want to use custom build local images with Minikube you need to build them into Minikube's internal docker cache, first use Minikube's Docker environment
eval $(minikube docker-env)
docker build -t ckan/ckan:2.9.3
setup_local_dev.ymlscript syncs local files or directories with CKAN pod running on Minikube. Run it with two parameters, first: local_path and second: remote_path, where remote path is a path already inside /usr/lib/ckan, so it can be just / '
Example: ./sync_local_repo.sh /home/michal/dms/ckanext-dms/ /