cloud-ca / docker-machine-driver-cloudca Goto Github PK
View Code? Open in Web Editor NEWDocker machine driver for cloud.ca
License: MIT License
Docker machine driver for cloud.ca
License: MIT License
Currently, we cannot provision hosts from public IPs on Rancher. The default flow is to have public IPs and because some of the port forwarding rules are missing, Rancher fails to provision the host correctly. You would have to check the Private IP flag and change the settings for the provision host which is not straight-forward.
One solution is to use static NAT instead of port-forwarding so that any port that is open, gets exposed correctly.
When CoreOS is deployed using docker-machine-driver-cloudca, after an automatic upgrade of CoreOS, docker daemon is not restarted by default, default behavior of CoreOS.
Maybe we should push the command via cloud-init
echo "docker ps" >> /etc/rc.local
as describe in rancher/rancher#5069
The only UUID in the list of parameters is --cloudca-network-id
($CLOUDCA_NETWORK_ID
).
It could be more user friendly to split this into 2 options that have names. This would allow us to provide default values for 4 different options, and would help customers getting started in a trial environment, as all of the names are standardized (i.e. compute-on / test_area / default-vpc / Frontend
).
I noticed that the driver doesn't populate the IPAddress field https://github.com/docker/machine/blob/15fd4c70403bab784d91031af02d9e169ce66412/libmachine/drivers/base.go#L17 in the base driver config, instead it populates its own variable https://github.com/cloud-ca/docker-machine-driver-cloudca/blob/master/cloudca.go#L85 PublicIp
The user-data pushed by the driver as cloud-init config is not good.
user-data sent is
#!/bin/sh
mkfs -t ext4 /dev/xvdb
mkdir -p /var/lib/docker
mount -t ext4 /dev/xvdb /var/lib/docker
The data volume is not remounted automatically after a reboot, and on CoreOS, the volume is formated at each reboot, which is dangerous because coreos will reboot automatically after a channel upgrade.
Good cloud-init configuration for coreos, ubuntu and centos:
Tested on ubuntu16.04 and coreos:
#cloud-config
fs_setup:
- label: data
filesystem: 'ext4'
device: '/dev/xvdb'
mounts:
- [ xvdb, /var/lib/docker, "ext4", "defaults", "0", "0" ]
coreos:
units:
- name: format-datavolume.service
command: start
content: |
[Unit]
Description=Formats the data volume
After=dev-xvdb.device
Requires=dev-xvdb.device
ConditionPathExists=!/var/lib/docker.btrfs
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/mkfs.btrfs /dev/xvdb
ExecStart=/usr/bin/mkdir /var/lib/docker.btrfs
- name: var-lib-docker.mount
command: start
content: |
[Unit]
Description=Mount data volume to /var/lib/docker
Requires=format-datavolume.service
After=format-datavolume.service
[Mount]
What=/dev/xvdb
Where=/var/lib/docker
Type=btrfs
- name: docker.service
drop-ins:
- name: 10-wait-docker.conf
content: |
[Unit]
After=var-lib-docker.mount
Requires=var-lib-docker.mount
To avoid confusion with the cloud.ca terminology, we should rename the cloudca-network-id
option to cloudca-tier-id
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.