- setup docker engine
- install kubernetes
- enable kubernetes with docker desktop
- Copy .env* files under root directory and remove .sample suffix
- Create registry_auth if not exists
- Complete the directories in .env, the path should be
$pwd/ $ (the actual directory as written in the env)
create localip entry in /etc/hosts
# ACCELERATOR IPS
xxx.xxx.xxx.xxx localip
xxx.xxx.xxx.xxx registry
xxx.xxx.xxx.xxx web_be
xxx.xxx.xxx.xxx indicates your ip address under iiasa network, check it out using ifconfig command
- clone the repo
docker compose -f docker-compose.dev.yml up minio --build
- use commit
git checkout 6bc1429
for the time being - create self signed certificates that will be used for titiler, as well as minio with following oneliner command
openssl req -x509 -newkey rsa:2048 -keyout private.key -out public.crt -days $DAYS -nodes -subj "/CN=localip"
- pub self signed certificates under certs, copy and rename it as minio-cert.crt under dockerfiles directory
- copy the above created private public set and place them under certs directory
- execute
docker compose -f docker-compose.dev.yml up minio --build
- access minio by https:localhost:9001 and create a set of access key.
- fill these 2 fields with the created access key inside .env.web.be and .env.celery INITIAL_S3_API_KEY= INITIAL_S3_SECRET_KEY=
- in .env.celery change
IMAGE_REGISTRY_URL=registry:8443
,IMAGE_REGISTRY_USER=myregistry
,IMAGE_REGISTRY_PASSWORD=myregistrypassword
- convert ~/.kube/config to json and then base64 string, fill field
WKUBE_SECRET_JSON_B64
with the processed base64 string - use command
python3 -c "import sys, yaml, json; print(json.dumps(yaml.safe_load(sys.stdin), indent=2))" < ~/.kube/config > config.json
to convert kubernetes config yaml as a json file - execute
base64 -w 0 ./config.json
to convert the config json to a base64 string
- execute command
docker run --rm --entrypoint htpasswd httpd:2 -Bbn myregistry myregistrypassword > /home/caosimin/Development/accelerator_service/registry_auth/htpasswd
to generate htpasswd
- execute
docker compose -f docker-compose.dev.yml up db --build
to build the db image - enter the db container with
docker exec -ti db /bin/sh
- create databases inside the container with
su -- postgres -c "createdb accelerator"
andsu -- postgres -c "createdb acceleratortest"
- make sure to config ~/.kube/config to json before convert it to base64 string
- inside
generic_scenario_explorer_backend
ignore the .env.sample, the configs are passing down as the containers are orchestrated