diff --git a/blueprints/docker-for-mac/base.yml b/blueprints/docker-for-mac/base.yml index f647ee902..3ffe7c994 100644 --- a/blueprints/docker-for-mac/base.yml +++ b/blueprints/docker-for-mac/base.yml @@ -9,7 +9,7 @@ init: - linuxkit/containerd:1b6b8a5884e17b26e2725cb82c436841070fca95 - linuxkit/ca-certificates:de21b84d9b055ad9dcecc57965b654a7a24ef8e0 onboot: - # support metadata for optional config in /var/config + # support metadata for optional config in /run/config - name: metadata image: linuxkit/metadata:2af15c9f4b0e73515c219b7cc14e6e65e1d4fd6d - name: sysctl diff --git a/blueprints/docker-for-mac/docker-ce.yml b/blueprints/docker-for-mac/docker-ce.yml index f244fb9b8..0d7da4cdf 100644 --- a/blueprints/docker-for-mac/docker-ce.yml +++ b/blueprints/docker-for-mac/docker-ce.yml @@ -1,7 +1,7 @@ services: # Run dockerd with the vpnkit userland proxy from the vpnkit-forwarder container. # Bind mounts /var/run to allow vsudd to connect to docker.sock, /var/vpnkit - # for vpnkit coordination and /var/config/docker for the configuration file. + # for vpnkit coordination and /run/config/docker for the configuration file. - name: docker-dfm image: docker:17.07.0-ce-dind capabilities: @@ -16,7 +16,7 @@ services: - /lib/modules:/lib/modules - /var/vpnkit:/port # vpnkit control 9p mount - /var/run:/var/run - - /var/config/docker:/var/config/docker + - /run/config/docker:/var/config/docker - /usr/bin/vpnkit-expose-port:/usr/bin/vpnkit-expose-port # userland proxy - /usr/bin/vpnkit-iptables-wrapper:/usr/bin/iptables # iptables wrapper command: [ "/usr/local/bin/docker-init", "/usr/local/bin/dockerd", "--", diff --git a/docs/metadata.md b/docs/metadata.md index d3efcea41..125ac0282 100644 --- a/docs/metadata.md +++ b/docs/metadata.md @@ -12,11 +12,11 @@ instances before launch (it is immutable in most providers). The [metadata package](../pkg/metadata/) handles both metadata and userdata for a number of providers (see below). It abstracts over the provider differences by exposing both metadata and userdata in -a directory hierarchy under `/var/config`. For example, sshd config -files from the metadata are placed under `/var/config/ssh`. +a directory hierarchy under `/run/config`. For example, sshd config +files from the metadata are placed under `/run/config/ssh`. Userdata is assumed to be a single string and the contents will be -stored under `/var/config/userdata`. If userdata is a JSON file, the +stored under `/run/config/userdata`. If userdata is a JSON file, the contents will be further processed, where different keys cause directories to be created and the directories are populated with files. For example, the following userdata file: @@ -45,9 +45,9 @@ For example, the following userdata file: ``` will generate the following files: ``` -/var/config/ssh/sshd_config -/var/config/foo/bar -/var/config/foo/baz +/run/config/ssh/sshd_config +/run/config/foo/bar +/run/config/foo/baz ``` The JSON file consists of a map from `name` to an entry object. Each entry object has the following fields: @@ -83,20 +83,20 @@ Below is a list of supported providers and notes on what is supported. We will a GCP metadata is reached via a well known URL (`http://metadata.google.internal/`) and currently we extract the hostname and populate the -`/var/config/ssh/authorized_keys` from metadata. In the future we'll +`/run/config/ssh/authorized_keys` from metadata. In the future we'll add more complete SSH support. GCP userdata is extracted from `/computeMetadata/v1/instance/attributes/userdata` -and made available in `/var/config/userdata`. +and made available in `/run/config/userdata`. ## AWS AWS metadata is reached via the following URL (`http://169.254.169.254/latest/meta-data/`) and currently we extract the -hostname and populate the `/var/config/ssh/authorized_keys` from metadata. +hostname and populate the `/run/config/ssh/authorized_keys` from metadata. AWS userdata is extracted from `http://169.254.169.254/latest/user-data` and -and made available in `/var/config/userdata`. +and made available in `/run/config/userdata`. ## HyperKit diff --git a/examples/aws.yml b/examples/aws.yml index a74ea779a..9e71d2cc4 100644 --- a/examples/aws.yml +++ b/examples/aws.yml @@ -20,7 +20,7 @@ services: - name: sshd image: linuxkit/sshd:ac5e8364e2e9aa8717a3295c51eb60b8c57373d5 binds: - - /var/config/ssh/authorized_keys:/root/.ssh/authorized_keys + - /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys - name: nginx image: nginx:alpine capabilities: diff --git a/examples/gcp.yml b/examples/gcp.yml index b2662ca52..6dd37123b 100644 --- a/examples/gcp.yml +++ b/examples/gcp.yml @@ -24,7 +24,7 @@ services: - name: sshd image: linuxkit/sshd:ac5e8364e2e9aa8717a3295c51eb60b8c57373d5 binds: - - /var/config/ssh/authorized_keys:/root/.ssh/authorized_keys + - /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys - name: nginx image: nginx:alpine capabilities: diff --git a/examples/openstack.yml b/examples/openstack.yml index db3f132c8..b7ba307c6 100644 --- a/examples/openstack.yml +++ b/examples/openstack.yml @@ -21,7 +21,7 @@ services: - name: sshd image: linuxkit/sshd:ac5e8364e2e9aa8717a3295c51eb60b8c57373d5 binds: - - /var/config/ssh/authorized_keys:/root/.ssh/authorized_keys + - /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys - name: nginx image: nginx:alpine capabilities: diff --git a/examples/vultr.yml b/examples/vultr.yml index b2662ca52..6dd37123b 100644 --- a/examples/vultr.yml +++ b/examples/vultr.yml @@ -24,7 +24,7 @@ services: - name: sshd image: linuxkit/sshd:ac5e8364e2e9aa8717a3295c51eb60b8c57373d5 binds: - - /var/config/ssh/authorized_keys:/root/.ssh/authorized_keys + - /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys - name: nginx image: nginx:alpine capabilities: diff --git a/pkg/metadata/main.go b/pkg/metadata/main.go index 46f3aa617..274d0e00e 100644 --- a/pkg/metadata/main.go +++ b/pkg/metadata/main.go @@ -12,7 +12,7 @@ import ( const ( // ConfigPath is where the data is extracted to - ConfigPath = "/var/config" + ConfigPath = "/run/config" // Hostname is the filename in configPath where the hostname is stored Hostname = "hostname"