Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails because no docker engine is installed #69

Closed
Linutux opened this issue Sep 16, 2020 · 5 comments
Closed

Install fails because no docker engine is installed #69

Linutux opened this issue Sep 16, 2020 · 5 comments

Comments

@Linutux
Copy link
Contributor

Linutux commented Sep 16, 2020

I tested the script, but unfortunately the install fails, because no docker engine is installed. I tried with

wait_for_commands = [
"sudo apt update",
"sudo apt upgrade -y",
"sudo curl https://releases.rancher.com/install-docker/19.03.sh | sh"
]

but without any success, because the worker nodes have no direct internet connection. Only private IP. How do I do that?

@remche
Copy link
Owner

remche commented Sep 16, 2020

  1. Note that best practice is to use Packer to prepare your own Openstack image embedding docker instead of installing it at deploy time.
  2. If you want to install in an air gaped environment, you will have to cook an Openstack image embedding all RKE docker images (or use a private registry). See here for a Packer recipe that pull RKE images.

@Linutux
Copy link
Contributor Author

Linutux commented Sep 17, 2020

Thank you @remche for your help!

If anyone needs a script to build an image with docker, here is a recipe for packer.io I wrote tonight. It builds an Ubuntu 20.04 with Docker.

docker.json
{ "builders": [ { "type": "openstack", "identity_endpoint": "https://identity.api.ams.fuga.cloud:443/v3", "ssh_username": "ubuntu", "image_name": "Ubuntu 20.04 LTS Docker", "source_image": "23970310-5513-470d-9ae0-dfffad57b3ac", "flavor": "p2.medium", "floating_ip_network": "bf66495a-4c0d-4725-88c0-462198f1b1fc", "networks": "bf66495a-4c0d-4725-88c0-462198f1b1fc", "security_groups": "Packer", "insecure": "true" } ], "provisioners": [ { "type": "shell", "inline": ["sleep 10"] }, { "type": "shell", "inline": ["echo 'the following file can be downloaded here: https://releases.rancher.com/install-docker/19.03.sh'"] }, { "type": "shell", "script": "19.03.sh" }, { "type": "shell", "inline": ["sudo usermod -aG docker ubuntu"] } ] }

You need to adjust
identity_endpoint: the endpoint of your openstack install
flavor: the flavor of the build machine
source_image: the ID of the Ubuntu 20.04 LTS image in Openstack
floating_ip_network and network: the ID of the "public" network

Create a sec group in Openstack with full ingress and egress rights, call it Packer.

Execute "wget https://releases.rancher.com/install-docker/19.03.sh"

Source your openrc.sh, then execute "/usr/bin/packer validate docker.json" and "/usr/bin/packer build docker.json"

@Linutux
Copy link
Contributor Author

Linutux commented Sep 17, 2020

But there is still a question left for me: How do I assign a floatingip to the worker nodes automatically? I want them to have a floatingip too, not only the master nodes.

@remche
Copy link
Owner

remche commented Sep 18, 2020

@Linutux edge nodes are worker nodes that get a floating ip. Simply use them instead of worker nodes.

@Linutux
Copy link
Contributor Author

Linutux commented Sep 19, 2020

Oh. Thanks!

@Linutux Linutux closed this as completed Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants