This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: add support for ignition when using virtualbox
Ignition support for virtualbox is present in Container Linux versions >= 1451.0.0
- Loading branch information
Alexander Pavel
committed
Jul 11, 2017
1 parent
19af1c3
commit 3dcc151
Showing
6 changed files
with
141 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
log/ | ||
user-data | ||
config.rb | ||
config.ign | ||
config.ign.merged | ||
*.vmdk | ||
*.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
etcd: | ||
name: "{HOSTNAME}" | ||
listen_peer_urls: "http://{PRIVATE_IPV4}:2380" | ||
listen_client_urls: "http://0.0.0.0:2379" | ||
initial_advertise_peer_urls: "http://{PRIVATE_IPV4}:2380" | ||
advertise_client_urls: "http://{PRIVATE_IPV4}:2379" | ||
# replace "<token>" with a valid etcd discovery token | ||
discovery: "https://discovery.etcd.io/<token>" | ||
|
||
systemd: | ||
units: | ||
- name: docker-tcp.socket | ||
enable: true | ||
contents: | | ||
[Unit] | ||
Description=Docker Socket for the API | ||
|
||
[Socket] | ||
ListenStream=2375 | ||
Service=docker.service | ||
BindIPv6Only=both | ||
|
||
[Install] | ||
WantedBy=sockets.target | ||
- name: flanneld.service | ||
dropins: | ||
- name: 50-network-config.conf | ||
contents: | | ||
[Service] | ||
ExecStartPre=/usr/bin/etcdctl set /flannel/network/config '{ "Network": "10.1.0.0/16" }' | ||
|
||
flannel: | ||
etcd_prefix: "/flannel/network" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"ignition": { | ||
"version": "2.0.0", | ||
"config": {} | ||
}, | ||
"storage": {}, | ||
"systemd": { | ||
"units": [ | ||
{ | ||
"name": "etcd-member.service", | ||
"enable": true, | ||
"dropins": [ | ||
{ | ||
"name": "20-clct-etcd-member.conf", | ||
"contents": "[Unit]\nRequires=coreos-metadata.service\nAfter=coreos-metadata.service\n\n[Service]\nEnvironmentFile=/run/metadata/coreos\nExecStart=\nExecStart=/usr/lib/coreos/etcd-wrapper $ETCD_OPTS \\\n --name=\"${COREOS_VAGRANT_VIRTUALBOX_HOSTNAME}\" \\\n --listen-peer-urls=\"http://${COREOS_VAGRANT_VIRTUALBOX_PRIVATE_IPV4}:2380\" \\\n --listen-client-urls=\"http://0.0.0.0:2379\" \\\n --initial-advertise-peer-urls=\"http://${COREOS_VAGRANT_VIRTUALBOX_PRIVATE_IPV4}:2380\" \\\n --advertise-client-urls=\"http://${COREOS_VAGRANT_VIRTUALBOX_PRIVATE_IPV4}:2379\" \\\n --discovery=\"https://discovery.etcd.io/<token>\"" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "flanneld.service", | ||
"enable": true, | ||
"dropins": [ | ||
{ | ||
"name": "20-clct-flannel.conf", | ||
"contents": "[Service]\nExecStart=\nExecStart=/usr/lib/coreos/flannel-wrapper $FLANNEL_OPTS \\\n --etcd-prefix=\"/flannel/network\"" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "docker-tcp.socket", | ||
"enable": true, | ||
"contents": "[Unit]\nDescription=Docker Socket for the API\n\n[Socket]\nListenStream=2375\nService=docker.service\nBindIPv6Only=both\n\n[Install]\nWantedBy=sockets.target\n" | ||
}, | ||
{ | ||
"name": "flanneld.service", | ||
"dropins": [ | ||
{ | ||
"name": "50-network-config.conf", | ||
"contents": "[Service]\nExecStartPre=/usr/bin/etcdctl set /flannel/network/config '{ \"Network\": \"10.1.0.0/16\" }'\n" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"networkd": {}, | ||
"passwd": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3dcc151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this commit is also locking the repo to the alpha core os image instead of using what the user provides. am i wrong or does documentation just need to be updated to reflect this change?
3dcc151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. This was due to the support for VirtualBox only being in the latest alpha (now it was promoted to beta). We may also add support for Ignition for the VMWare provider, which would likely keep us locked to alpha until that release makes it to stable as well. Once both providers have Ignition support in the stable channel of Container Linux, we can add the channel configuration back again.
3dcc151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I knew there had to be a reason for it. Thanks for the quick response