Reputation: 164
ORIGINAL: I'm trying to install CoreOS onto a bare metal server and continually failing on loading my custom cloud-config.yml file. Here is a copy of the cloud-config.yml file:
#cloud-config
hostname: ejk
ssh_authorized_keys:
-ssh-rsa AAAAA.......<and so on>
coreos:
etcd:
discovery: https://discovry.etcd.io/<the key>
units:
- name: 10-static.network
runtime: true
content: |
[Match]
Name=eno1
[Network]
Address=10.113.38.172/26
[Route]
Gateway=10.113.38.129
Destination=10.0.0.0/8
This fails on coreos-cloudinit -validate -from-file ./cloud-config.yml with error:
line 9: error: did not find expected '-' indicator
line 0: warning: incorrect type for "" (want struct)
Any help greatly appreciated ... I've tried all sorts of various combinations. When I remove from "unit" downwards it validates fine ... so something in these lines ...
Thanks EJK
UPDATE#1 Not a full answer yet but a step forward ... I have successfully fiddled with this to get it to agree the configuration ... here:
#cloud-config
hostname: ejk
ssh_authorized_keys:
-ssh-rsa AAAAA.......<and so on>
coreos:
etcd:
discovery: https://discovry.etcd.io/<the key>
units:
- name: 10-static.network
-
runtime: true
content: |
[Match]
Name=eno1
[Network]
Address=10.113.38.172/26
[Route]
Gateway=10.113.38.129
Destination=10.0.0.0/8
Inexplicable the addition of the extra '-'(minus resolves the errors and allows CoreOS to be installed. However once this has installed on the bare metal the machines IP address is unreachable ... and of course as its CoreOS I can't log in/PuTTY in ...
Clearly something is wrong with this network configuration ... as before any help greatly appreciated.
UPDATE#2 Okay so I've played some more with cloud-config.yml and the validator both:
# coresos -cloudinit -validate -from-file ./cloud-config.yml; &
coreos.com/validate - their online validator ...
I have a valid file:
#cloud-config
hostname: ejk
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVg0I+87IKMmC9E/aJroM6mcUTNNX/vaIF0Te4U8aZOnUWLHQ3JfYipRO9XWTE+qozTIFq8qHyvLVmQY2lPWRTMtbutBaJQy0tPNERwnqdM5zWjjgoF+ZG7hti8ngRSMgvOymg5Tc5/f4z8hrsmNHiwVdqKm7AWY+BiV+RkUBoHkvTyTr5cHRdL/ks2p6cXjOzlw/l2oPR3PYFdetM/YOr28 <etc.>
coreos:
etcd:
discovery: https://discovry.etcd.io/<the key>
coreos:
units:
- name: 10-static.network
runtime: yes
content: |
[Match]
Name=eno1
[Network]
Address=10.113.38.172/26
[Route]
Gateway=10.113.38.129
Destination=10.0.0.0/8
Even though this validates, and CoreOS is installed on the bare metal machine - it does not result in an active network eno1 on the finally booted host. So this request for help now moves to a request for CoreOS help on why a SoftLayer bare metal machine is not configuring the network - is this a /etc/systemd/network issue? or hardware? or other ...
As before any help greatly appreciated ...
Thanks EJK
Upvotes: 1
Views: 1428
Reputation: 2394
Hy, thats how i applie a working network config on a xenserver:
units:
- name: 00-eth0.network
runtime: true
content: |
[Match]
Name=eth0
[Network]
DNS=8.8.8.8
Address=10.0.0.104/24
Gateway=10.0.0.1
May you have to change some lines to meet your requierments.
Upvotes: 1