From 847b656cffc8ba68635ea326915ac1cce9a24b61 Mon Sep 17 00:00:00 2001 From: James Bayer Date: Sat, 24 Jan 2015 20:58:12 -0800 Subject: [PATCH] updated ubuntu getting started for 0.2.0 update README with detailed trust step-by-step link --- .../getting-started-ubuntu-trusty.md | 100 ++++++++++++++---- README.md | 6 +- 2 files changed, 82 insertions(+), 24 deletions(-) diff --git a/Documentation/getting-started-ubuntu-trusty.md b/Documentation/getting-started-ubuntu-trusty.md index 7749c28..8fd8079 100644 --- a/Documentation/getting-started-ubuntu-trusty.md +++ b/Documentation/getting-started-ubuntu-trusty.md @@ -16,11 +16,57 @@ vagrant up --provider virtualbox vagrant ssh sudo su -curl -L https://github.com/coreos/rocket/releases/download/v0.1.1/rocket-v0.1.1.tar.gz -o rocket-v0.1.1.tar.gz -tar xzvf rocket-v0.1.1.tar.gz -cd rocket-v0.1.1 -./rkt fetch https://github.com/coreos/etcd/releases/download/v0.5.0-alpha.4/etcd-v0.5.0-alpha.4-linux-amd64.aci +wget https://github.com/coreos/rocket/releases/download/v0.2.0/rocket-v0.2.0.tar.gz +tar xzvf rocket-v0.2.0.tar.gz +cd rocket-v0.2.0 +./rkt help +``` +## Trust the CoreOS signing key +This shows how to trust the CoreOS signing key with the procedure outlined in [Signing and Verification Guide](https://github.com/coreos/rocket/blob/master/Documentation/signing-and-verification-guide.md) + +Download the public key +`curl -O https://coreos.com/dist/pubkeys/aci-pubkeys.gpg` + +Get the fingerprint +``` +gpg --with-fingerprint aci-pubkeys.gpg +``` + +``` +pub 4096R/88182190 2015-01-23 CoreOS ACI Builder +Key fingerprint = 8B86 DE38 890D DB72 9186 7B02 5210 BD88 8818 2190 +``` + +Format the fingerprint for the filename +``` +echo "8B86 DE38 890D DB72 9186 7B02 5210 BD88 8818 2190" | tr -d "[:space:]" | tr '[:upper:]' '[:lower:]' +``` + +``` +8b86de38890ddb7291867b025210bd8888182190 +``` + +Create the directory to trust coreos.com/etcd aci's signed by this key +``` +mkdir -p /etc/rkt/trustedkeys/prefix.d/coreos.com/etcd/ +``` + +Move the key to a filename with the fingerprint of the key +``` +mv aci-pubkeys.gpg /etc/rkt/trustedkeys/prefix.d/coreos.com/etcd/8b86de38890ddb7291867b025210bd8888182190 +``` + +## Fetch the ACI + +``` +./rkt fetch https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci +rkt: fetching image from https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci +Downloading aci: [ ] 16.4 KB/3.58 MB +Downloading signature from https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.sig +rkt: signature verified: + CoreOS ACI Builder +sha512-fcdf12587358af6ebe69b5338a05df67 ``` ## Run the ACI @@ -28,23 +74,35 @@ cd rocket-v0.1.1 Now try running the container and you should see output like this: ``` -./rkt run https://github.com/coreos/etcd/releases/download/v0.5.0-alpha.4/etcd-v0.5.0-alpha.4-linux-amd64.aci +./rkt run https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci +rkt: fetching image from https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci /etc/localtime is not a symlink, not updating container timezone. -2014/12/02 08:13:11 no data-dir provided, using default data-dir ./default.etcd -2014/12/02 08:13:11 etcd: listening for peers on http://localhost:2380 -2014/12/02 08:13:11 etcd: listening for peers on http://localhost:7001 -2014/12/02 08:13:11 etcd: listening for client requests on http://localhost:2379 -2014/12/02 08:13:11 etcd: listening for client requests on http://localhost:4001 -2014/12/02 08:13:11 etcdserver: name = default -2014/12/02 08:13:11 etcdserver: data dir = default.etcd -2014/12/02 08:13:11 etcdserver: snapshot count = 10000 -2014/12/02 08:13:11 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001 -2014/12/02 08:13:11 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001 -2014/12/02 08:13:11 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001 -2014/12/02 08:13:11 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae -2014/12/02 08:13:11 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae -2014/12/02 08:13:12 raft: elected leader ce2a822cea30bfca at term 1 -2014/12/02 08:13:12 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae +2015/01/25 04:56:34 no data-dir provided, using default data-dir ./default.etcd +2015/01/25 04:56:34 etcd: listening for peers on http://localhost:2380 +2015/01/25 04:56:34 etcd: listening for peers on http://localhost:7001 +2015/01/25 04:56:34 etcd: listening for client requests on http://localhost:2379 +2015/01/25 04:56:34 etcd: listening for client requests on http://localhost:4001 +2015/01/25 04:56:34 etcdserver: name = default +2015/01/25 04:56:34 etcdserver: data dir = default.etcd +2015/01/25 04:56:34 etcdserver: heartbeat = 100ms +2015/01/25 04:56:34 etcdserver: election = 1000ms +2015/01/25 04:56:34 etcdserver: snapshot count = 10000 +2015/01/25 04:56:34 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001 +2015/01/25 04:56:34 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001 +2015/01/25 04:56:34 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001 +2015/01/25 04:56:34 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae +2015/01/25 04:56:34 raft: ce2a822cea30bfca became follower at term 0 +2015/01/25 04:56:34 raft: newRaft ce2a822cea30bfca [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] +2015/01/25 04:56:34 raft: ce2a822cea30bfca became follower at term 1 +2015/01/25 04:56:34 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae +2015/01/25 04:56:35 raft: ce2a822cea30bfca is starting a new election at term 1 +2015/01/25 04:56:35 raft: ce2a822cea30bfca became candidate at term 2 +2015/01/25 04:56:35 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 2 +2015/01/25 04:56:35 raft: ce2a822cea30bfca became leader at term 2 +2015/01/25 04:56:35 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 2 +2015/01/25 04:56:35 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae + +Press ^] three times to kill container ``` -You are now running etcd inside of a rocket container. +You are now running etcd inside of a rocket container on Ubuntu Trusty. diff --git a/README.md b/README.md index 2af496a..5ed5c9d 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,14 @@ Keep in mind while running through the examples that right now `rkt` needs to be Rocket uses content addressable storage (CAS) for storing an ACI on disk. In this example, the image is downloaded and added to the CAS. -(Note that since Rocket verifies signatures by default, you will need to first [trust](https://github.com/coreos/rocket/blob/master/Documentation/signing-and-verification-guide.md#establishing-trust) the [CoreOS public key](https://coreos.com/dist/pubkeys/aci-pubkeys.gpg) used to sign the image.) +(Note that since Rocket verifies signatures by default, you will need to first [trust](https://github.com/coreos/rocket/blob/master/Documentation/signing-and-verification-guide.md#establishing-trust) the [CoreOS public key](https://coreos.com/dist/pubkeys/aci-pubkeys.gpg) used to sign the image. Detailed step-by-step for the signing procedure [is here](Documentation/getting-started-ubuntu-trusty.md#trust-the-coreos-signing-key).) ``` [~/rocket-v0.2.0]$ sudo ./rkt fetch https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci rkt: fetching image from https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci Downloading aci: [=============================== ] 2.49 MB/3.58 MB Downloading signature from https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.sig -rkt: signature verified: +rkt: signature verified: CoreOS ACI Builder sha512-fcdf12587358af6ebe69b5338a05df67 ``` @@ -59,7 +59,7 @@ Per the [App Container Specification](https://github.com/appc/spec/blob/master/S [~]$ wget https://github.com/coreos/etcd/releases/download/v2.0.0-rc.1/etcd-v2.0.0-rc.1-linux-amd64.aci ... [~]$ $ gzip -dc etcd-v2.0.0-rc.1-linux-amd64.aci > etcd-v2.0.0-rc.1-linux-amd64.tar -[~]$ sha512sum etcd-v2.0.0-rc.1-linux-amd64.tar +[~]$ sha512sum etcd-v2.0.0-rc.1-linux-amd64.tar fcdf12587358af6ebe69b5338a05df673ab7c95539f4cac09b0ceb4ea9b1233922700bdbafd5b6783e129d3f5e9d17bc7f0a07912b8a0a8c0ff7bf732a3f0acf etcd-v2.0.0-rc.1-linux-amd64.tar ```