ansible-taler-exchange

Ansible playbook to deploy a production Taler Exchange
Log | Files | Refs | Submodules | README | LICENSE

build.sh (1280B)


      1 #!/bin/bash
      2 set -exuo pipefail
      3 
      4 #### WARNING: THIS SCRIPT IS INTENED TO BE RUN INSIDE OF A CONTAINER
      5 
      6 
      7 # Print some debug info
      8 id ; cat /proc/self/uid_map ; mount | grep cgroup || true
      9 
     10 # Hack to make podman adapt to being nested
     11 rm -f /etc/containers/storage.conf
     12 
     13 # Build our image
     14 podman build -f Containerfile -t ansible-taler-test
     15 
     16 # Run in background (-d) with systemd init
     17 podman run \
     18 	--privileged \
     19 	--tmpfs /sys \
     20 	--rm \
     21 	--name ansible-taler-test \
     22 	-d localhost/ansible-taler-test sh -c "id ; cat /proc/self/uid_map ; mount | grep cgroup; exec /usr/sbin/init --show-status"  
     23 
     24 # Print to log that container is running
     25 podman ps
     26 
     27 # TOFU SSH host keys (so we don't get user prompt)
     28 echo "StrictHostKeyChecking=accept-new" > ~/.ssh/config
     29 
     30 # Run our playbook(s)
     31 # NOTE: Trailing comma is correct (and required) in agument for -i flag
     32 ansible-playbook --verbose -i 127.0.0.1:22, --user root playbooks/setup.yml
     33 
     34 echo -e '
     35          #############################
     36          #############################
     37 	 #############################
     38 	 ###### Setup finished. ######
     39 	 ## Launching services now! ##
     40 	 #############################
     41 	 #############################
     42 	 #############################'
     43 
     44 ansible-playbook --verbose -i 127.0.0.1:22, --user root playbooks/start.yml