diff --git a/projects/demo/README.md b/projects/demo/README.md index c67f0f28d..fc669e967 100644 --- a/projects/demo/README.md +++ b/projects/demo/README.md @@ -1,11 +1,12 @@ -This directory contains files used in moby demos. +This directory contains files used in Moby/LinuxKit DockerCon 2017 +keynote demos. They mostly serve as examples and probably need +adjustments to your specific environment. # Prerequisites Most of the scripts/files assume you are on a Mac. -- Recent Docker for Mac installed (edge, nightly, master channel) - For some of the demo setup, you need at least 17.05.0-ce-rc1 +- Recent Docker for Mac installed (We used 17.05.0-ce-rc1-mac8 from the edge channel) - For the GCP portion: `brew install google-cloud-sdk` - Infrakit: Clone [infrakit](https://github.com/docker/infrakit) and the [GCP plugin](https://github.com/docker/infrakit.gcp) for @@ -25,16 +26,6 @@ gcloud auth application-default login You may also want to create ssh-keys and upload them. See the [Generating a new SSH key-pair section](https://cloud.google.com/compute/docs/instances/connecting-to-instance) -One time configuration of the network: -``` -gcloud compute networks create rneugeba-demo --mode auto -gcloud compute networks subnets list -# get IP subnet for rneugeba-demo -gcloud compute firewall-rules create rneugeba-demo-internal --network \ - rneugeba-demo --allow tcp,udp,icmp --source-ranges 10.128.0.0/9 -``` -The firewall setup means that all our projects networks can talk to the demo network. - # Expose VMs ports on localhost @@ -44,6 +35,6 @@ You can use a `socat` container to forward ports from the VM to localhost (via D ``` And then run: ``` -docker run --rm -t -d -p 8080:8080 socat tcp-listen:8080,reuseaddr,fork tcp:192.168.65.100:80 +docker run --rm -t -d -p 8080:8080 socat tcp-listen:6379,reuseaddr,fork tcp:192.168.65.100:6379 ``` -This forwards local port `8080` to `192.168.65.100:80`, so if you start, say the `intro` image, run `moby run -ip 196.168.65.100 intro` +This forwards local (host) port `6379` to `192.168.65.100:6379`, so if you start, say the `redis-os` image, run `moby run -ip 196.168.65.100 redis-os`. diff --git a/projects/demo/etcd/README.md b/projects/demo/etcd/README.md index c40c6d19f..a86b88236 100644 --- a/projects/demo/etcd/README.md +++ b/projects/demo/etcd/README.md @@ -44,9 +44,23 @@ You can perform rolling updates, by for example, switching the kernel version in ## Infrakit GCP setup -Note: This setup is somewhat specific to our GCP setup (IP addresses -and account info) and needs to be adjusted to your setting. The -configuration is documented in the top-level README.md. +You need to do the general setup as described in the demo [README](../README.md). Specifically, you need the `CLOUDSDK_*` environment variables set and you need to have authenticated with GCP. + +Note, the demo uses static IP addresses and they are specific to our +setup. The IP addresses need to be changed in the `infrakit-gcp.json` +config file. + +In order to use the static IP addresses we created a custom network: +``` +gcloud compute networks create rneugeba-demo --mode auto +gcloud compute networks subnets list +# get IP subnet for rneugeba-demo +gcloud compute firewall-rules create rneugeba-demo-internal --network \ + rneugeba-demo --allow tcp,udp,icmp --source-ranges 10.132.0.0/9 +``` +The firewall setup means that all our projects networks can talk to the demo +network. + Build the image and upload it: ```