coreos-base/oem-*: move Ignition base/default configs into OEMs

Configs from Ignition commit dc992fff72cf45fbed14d2144d05a9df91eb2bd6.
This commit is contained in:
Benjamin Gilbert 2017-11-18 10:27:22 -05:00
parent 5dc1c520b0
commit 31170232f0
29 changed files with 352 additions and 0 deletions

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,34 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/waagent.service",
"contents": {
"source": "oem:///units/waagent.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "waagent.service",
"enabled": true
},
{
"name": "etcd2.service",
"dropins": [
{
"name": "10-oem.conf",
"contents": "[Service]\nEnvironment=ETCD_ELECTION_TIMEOUT=1200\n"
}
]
}
]
}
}

View File

@ -0,0 +1,14 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from Azure metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=azure\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -26,5 +26,6 @@ src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/units"
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,13 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
}
]
}
}

View File

@ -0,0 +1,14 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from DigitalOcean metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=digitalocean\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -23,4 +23,5 @@ src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,22 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "etcd2.service",
"dropins": [
{
"name": "10-oem.conf",
"contents": "[Service]\nEnvironment=ETCD_ELECTION_TIMEOUT=1200\n"
}
]
}
]
}
}

View File

@ -0,0 +1,22 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "user-configdrive.service",
"mask": true
},
{
"name": "user-configvirtfs.service",
"mask": true
},
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from platform metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=ec2-compat\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -50,4 +50,11 @@ src_install() {
elif use brightbox ; then
newins "${FILESDIR}/grub-brightbox.cfg" grub.cfg
fi
insinto "/usr/share/oem/base"
doins "${FILESDIR}/base/README"
doins "${FILESDIR}/base/default.ign"
if use ec2 ; then
newins "${FILESDIR}/base/base-ec2.ign" base.ign
fi
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,45 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/oem-gce.service",
"contents": {
"source": "oem:///units/oem-gce.service"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/hosts",
"contents": {
"source": "oem:///files/hosts"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/profile.d/google-cloud-sdk.sh",
"contents": {
"source": "oem:///files/google-cloud-sdk.sh"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "oem-gce.service",
"enabled": true
}
]
}
}

View File

@ -0,0 +1,14 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from GCE metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=gce\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -0,0 +1,3 @@
#!/bin/sh
alias gcloud="(docker images google/cloud-sdk || docker pull google/cloud-sdk) > /dev/null;docker run -ti --rm --net="host" -v $HOME/.config:/root/.config -v /var/run/docker.sock:/var/run/docker.sock google/cloud-sdk gcloud"
alias gsutil="(docker images google/cloud-sdk || docker pull google/cloud-sdk) > /dev/null;docker run -ti --rm --net="host" -v $HOME/.config:/root/.config google/cloud-sdk gsutil"

View File

@ -0,0 +1,2 @@
169.254.169.254 metadata
127.0.0.1 localhost

View File

@ -24,5 +24,7 @@ src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/files"
doins -r "${FILESDIR}/units"
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,45 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/oracle-oci-root-setup.service",
"contents": {
"source": "oem:///units/oracle-oci-root-setup.service"
},
"mode": 292
},
{
"filesystem": "root",
"path": "/etc/systemd/system/oracle-oci-iptables.service",
"contents": {
"source": "oem:///units/oracle-oci-iptables.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "iscsid.service",
"enabled": true
},
{
"name": "oracle-oci-root-setup.service",
"enabled": true
},
{
"name": "oracle-oci-iptables.service",
"enabled": true
}
]
}
}

View File

@ -24,5 +24,6 @@ src_install() {
doins "${FILESDIR}/grub.cfg"
doins "${FILESDIR}/iptables-rules"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/units"
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in userdata.

View File

@ -0,0 +1,29 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/packet-phone-home.service",
"contents": {
"source": "oem:///units/packet-phone-home.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "coreos-metadata-sshkeys@.service",
"enabled": true
},
{
"name": "packet-phone-home.service",
"enabled": true
}
]
}
}

View File

@ -0,0 +1,14 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from Packet metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=packet\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -23,5 +23,6 @@ src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/units"
}

View File

@ -0,0 +1,4 @@
These Ignition configs are part of the OEM configuration. Do not modify
them. If you want to write an Ignition config directly to disk, put it in
../config.ign and it will be applied at first boot instead of a config
in guestinfo.

View File

@ -0,0 +1,25 @@
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/systemd/system/vmtoolsd.service",
"contents": {
"source": "oem:///units/vmtoolsd.service"
},
"mode": 292
}
]
},
"systemd": {
"units": [
{
"name": "vmtoolsd.service",
"enabled": true
}
]
}
}

View File

@ -0,0 +1,14 @@
{
"ignition": {
"version": "2.1.0"
},
"systemd": {
"units": [
{
"name": "oem-cloudinit.service",
"enabled": true,
"contents": "[Unit]\nDescription=Cloudinit from VMware metadata\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/coreos-cloudinit --oem=vmware\n\n[Install]\nWantedBy=multi-user.target\n"
}
]
}
}

View File

@ -29,5 +29,6 @@ src_install() {
insinto "/usr/share/oem"
doins "${FILESDIR}/grub.cfg"
doins "${T}/oem-release"
doins -r "${FILESDIR}/base"
doins -r "${FILESDIR}/units"
}