Skip to content

nicola-milani/challenge1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

challenge1

#Example and source

Launch Ansible Playbook to deploy a cluster with 2 vms centos ansible-playbook -i inventory.yml create.yml Destroy vms ansible-playbook -i inventory.yml destroy.yml

Local path with ssl certificate for remote connection /root/docker-cluster/ssl/<vm-name>/etc/docker/<cluster-name>/ es: /root/docker-cluster/ssl/vm-node1/etc/docker/my-clusters/ you can't connect to remote docker daemon without certificate alt text

Connect to remote docker API REST

export DOCKER_HOST="tcp://192.168.8.2:2376"
export DOCKER_CERT_PATH="/root/docker-cluster/ssl/vm-node1/etc/docker/my-clusters/

after this setup you can use remote docker daemon alt text you can use http like this

curl -k -s -XGET https://192.168.8.2:2376/v1.24/containers/json?all=1 --cert /root/docker-cluster/ssl/vm-node1/etc/docker/my-clusters/cert.pem --key /root/docker-cluster/ssl/vm-node1/etc/docker/my-clusters/key.pem --cacert /root/docker-cluster/ssl/vm-node1/etc/docker/my-clusters/ca.pem | jq

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published