Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Documentation/cloud-config-locations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ On every boot, coreos-cloudinit looks for a config file to configure your host.
| `/media/configdrive/openstack/latest/user_data` | FAT or ISO9660 filesystem with [config-2](config-drive.md#qemu-virtfs) label and `/media/configdrive/` mount point. It should also contain a `openstack/latest/user_data` relative path. Usually used in installations which are configured by USB Flash sticks or CDROM media. |
| Kernel command line: `cloud-config-url=http://example.com/user_data`. | You can find this string using this command `cat /proc/cmdline`. Usually used in [PXE](https://www.flatcar.org/docs/latest/installing/bare-metal/booting-with-pxe/) or [iPXE](https://www.flatcar.org/docs/latest/installing/bare-metal/booting-with-ipxe/) boots. |
| `/var/lib/coreos-install/user_data` | When you install Flatcar Container Linux manually using the [flatcar-install](https://www.flatcar.org/docs/latest/installing/bare-metal/installing-to-disk/) tool. Usually used in bare metal installations. |
| `/usr/share/oem/cloud-config.yml` | Path for OEM images. |
| `/usr/share/coreos/cloud-config.yml` | Path for OEM images. |
| `/var/lib/coreos-vagrant/vagrantfile-user-data`| Vagrant OEM scripts automatically store Cloud-Config into this path. |
| `/var/lib/waagent/CustomData`| Azure platform uses OEM path for first Cloud-Config initialization and then `/var/lib/waagent/CustomData` to apply your settings. |
| `http://169.254.169.254/metadata/v1/user-data` `http://169.254.169.254/2009-04-04/user-data` `https://metadata.packet.net/userdata`|DigitalOcean, EC2 and Packet cloud providers correspondingly use these URLs to download Cloud-Config.|
| `/usr/share/oem/bin/vmtoolsd --cmd "info-get guestinfo.coreos.config.data"` | Cloud-Config provided by [VMware Guestinfo][VMware Guestinfo] |
| `/usr/share/oem/bin/vmtoolsd --cmd "info-get guestinfo.coreos.config.url"` | Cloud-Config URL provided by [VMware Guestinfo][VMware Guestinfo] |
| `http://169.254.169.254/metadata/v1/user-data` `http://169.254.169.254/2009-04-04/user-data`|DigitalOcean and EC2 cloud providers correspondingly use these URLs to download Cloud-Config.|
| `vmtoolsd --cmd "info-get guestinfo.coreos.config.data"` | Cloud-Config provided by [VMware Guestinfo][VMware Guestinfo] |
| `vmtoolsd --cmd "info-get guestinfo.coreos.config.url"` | Cloud-Config URL provided by [VMware Guestinfo][VMware Guestinfo] |

[VMware Guestinfo]: vmware-guestinfo.md

Expand Down
12 changes: 6 additions & 6 deletions Documentation/cloud-config-oem.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ For example, the following cloud-config document...
#cloud-config
coreos:
oem:
id: "rackspace"
name: "Rackspace Cloud Servers"
id: "cloudstack"
name: "CloudStack"
version-id: "168.0.0"
home-url: "https://www.rackspace.com/cloud/servers/"
home-url: "https://cloudstack.apache.org/"
bug-report-url: "https://github.com/flatcar/flatcar/issues"
```

...would be rendered to the following `/etc/oem-release`:

```yaml
ID=rackspace
NAME="Rackspace Cloud Servers"
ID=cloudstack
NAME="CloudStack"
VERSION_ID=168.0.0
HOME_URL="https://www.rackspace.com/cloud/servers/"
HOME_URL="https://cloudstack.apache.org/"
BUG_REPORT_URL="https://github.com/flatcar/flatcar/issues"
```

Expand Down
4 changes: 2 additions & 2 deletions Documentation/cloud-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Environment="ETCD_PEER_ADDR=192.0.2.13:7001"

For more information about the available configuration parameters, see the [etcd documentation][etcd-config].

_Note: The `$private_ipv4` and `$public_ipv4` substitution variables referenced in other documents are only supported on Amazon EC2, Google Compute Engine, OpenStack, Rackspace, DigitalOcean, and Vagrant._
_Note: The `$private_ipv4` and `$public_ipv4` substitution variables referenced in other documents are only supported on Amazon EC2, Google Compute Engine, OpenStack, DigitalOcean, and Vagrant._

[etcd-config]: https://etcd.io/docs/v3.5/op-guide/configuration/

Expand Down Expand Up @@ -126,7 +126,7 @@ Environment="ETCD_LISTEN_PEER_URLS=http://192.0.2.13:2380,http://192.0.2.13:7001

For more information about the available configuration parameters, see the [etcd2 documentation][etcd2-config].

_Note: The `$private_ipv4` and `$public_ipv4` substitution variables referenced in other documents are only supported on Amazon EC2, Google Compute Engine, OpenStack, Rackspace, DigitalOcean, and Vagrant._
_Note: The `$private_ipv4` and `$public_ipv4` substitution variables referenced in other documents are only supported on Amazon EC2, Google Compute Engine, OpenStack, DigitalOcean, and Vagrant._

[etcd2-config]: https://etcd.io/docs/v2.3/configuration/

Expand Down
10 changes: 5 additions & 5 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ coreos:
'
oem:
id: rackspace
name: Rackspace Cloud Servers
id: cloudstack
name: CloudStack
version_id: 168.0.0
home_url: https://www.rackspace.com/cloud/servers/
home_url: https://cloudstack.apache.org/
bug_report_url: https://github.com/flatcar/coreos-overlay
ssh_authorized_keys:
- foobar
Expand Down Expand Up @@ -360,8 +360,8 @@ Address=10.209.171.177/19
}
}

if cfg.CoreOS.OEM.ID != "rackspace" {
t.Errorf("Failed parsing coreos.oem. Expected ID 'rackspace', got %q.", cfg.CoreOS.OEM.ID)
if cfg.CoreOS.OEM.ID != "cloudstack" {
t.Errorf("Failed parsing coreos.oem. Expected ID 'cloudstack', got %q.", cfg.CoreOS.OEM.ID)
}

if cfg.Hostname != "trontastic" {
Expand Down
20 changes: 2 additions & 18 deletions coreos-cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
"github.com/flatcar/coreos-cloudinit/datasource/metadata/digitalocean"
"github.com/flatcar/coreos-cloudinit/datasource/metadata/ec2"
"github.com/flatcar/coreos-cloudinit/datasource/metadata/gce"
"github.com/flatcar/coreos-cloudinit/datasource/metadata/packet"
"github.com/flatcar/coreos-cloudinit/datasource/proc_cmdline"
"github.com/flatcar/coreos-cloudinit/datasource/url"
"github.com/flatcar/coreos-cloudinit/datasource/vmware"
Expand Down Expand Up @@ -66,7 +65,6 @@ var (
gceMetadataService string
cloudSigmaMetadataService bool
digitalOceanMetadataService string
packetMetadataService string
url string
procCmdLine bool
vmware bool
Expand All @@ -92,7 +90,6 @@ func init() {
flag.StringVar(&flags.sources.gceMetadataService, "from-gce-metadata", "", "Download GCE data from the provided url")
flag.BoolVar(&flags.sources.cloudSigmaMetadataService, "from-cloudsigma-metadata", false, "Download data from CloudSigma server context")
flag.StringVar(&flags.sources.digitalOceanMetadataService, "from-digitalocean-metadata", "", "Download DigitalOcean data from the provided url")
flag.StringVar(&flags.sources.packetMetadataService, "from-packet-metadata", "", "Download Packet data from metadata service")
flag.StringVar(&flags.sources.url, "from-url", "", "Download user-data from provided url")
flag.BoolVar(&flags.sources.procCmdLine, "from-proc-cmdline", false, fmt.Sprintf("Parse %s for '%s=<url>', using the cloud-config served by an HTTP GET to <url>", proc_cmdline.ProcCmdlineLocation, proc_cmdline.ProcCmdlineCloudConfigFlag))
flag.BoolVar(&flags.sources.vmware, "from-vmware-guestinfo", false, "Read data from VMware guestinfo")
Expand All @@ -118,19 +115,12 @@ var (
"gce": {
"from-gce-metadata": "http://metadata.google.internal/",
},
"rackspace-onmetal": {
"from-configdrive": "/media/configdrive",
"convert-netconf": "debian",
},
"azure": {
"from-waagent": "/var/lib/waagent",
},
"cloudsigma": {
"from-cloudsigma-metadata": "true",
},
"packet": {
"from-packet-metadata": "https://metadata.packet.net/",
},
"vmware": {
"from-vmware-guestinfo": "true",
"convert-netconf": "vmware",
Expand Down Expand Up @@ -170,16 +160,15 @@ func main() {
switch flags.convertNetconf {
case "":
case "debian":
case "packet":
case "vmware":
default:
fmt.Printf("Invalid option to -convert-netconf: '%s'. Supported options: 'debian, packet, vmware'\n", flags.convertNetconf)
fmt.Printf("Invalid option to -convert-netconf: '%s'. Supported options: 'debian, vmware'\n", flags.convertNetconf)
os.Exit(2)
}

dss := getDatasources()
if len(dss) == 0 {
fmt.Println("Provide at least one of --from-file, --from-configdrive, --from-ec2-metadata, --from-gce-metadata, --from-cloudsigma-metadata, --from-packet-metadata, --from-digitalocean-metadata, --from-vmware-guestinfo, --from-waagent, --from-url or --from-proc-cmdline")
fmt.Println("Provide at least one of --from-file, --from-configdrive, --from-ec2-metadata, --from-gce-metadata, --from-cloudsigma-metadata, --from-digitalocean-metadata, --from-vmware-guestinfo, --from-waagent, --from-url or --from-proc-cmdline")
os.Exit(2)
}

Expand Down Expand Up @@ -319,8 +308,6 @@ func setupNetworkUnits(netConfig interface{}, env *initialize.Environment, netco
switch netconf {
case "debian":
ifaces, err = network.ProcessDebianNetconf(netConfig.([]byte))
case "packet":
ifaces, err = network.ProcessPacketNetconf(netConfig.(packet.NetworkData))
case "vmware":
ifaces, err = network.ProcessVMwareNetconf(netConfig.(map[string]string))
default:
Expand Down Expand Up @@ -367,9 +354,6 @@ func getDatasources() []datasource.Datasource {
if flags.sources.waagent != "" {
dss = append(dss, waagent.NewDatasource(flags.sources.waagent))
}
if flags.sources.packetMetadataService != "" {
dss = append(dss, packet.NewDatasource(flags.sources.packetMetadataService))
}
if flags.sources.procCmdLine {
dss = append(dss, proc_cmdline.NewDatasource())
}
Expand Down
106 changes: 0 additions & 106 deletions datasource/metadata/packet/metadata.go

This file was deleted.

115 changes: 0 additions & 115 deletions network/packet.go

This file was deleted.

Loading
Loading