mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
demo: Update documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
01e39a16ac
commit
93a9a827b6
@ -5,6 +5,8 @@ This directory contains files used in moby demos.
|
||||
Most of the scripts/files assume you are on a Mac.
|
||||
|
||||
- Recent Docker for Mac installed (edge, nightly, master channel)
|
||||
- Currently, you need a *custom* version of VPNKit installed in Docker
|
||||
for Mac. Contact @magnus or @rneugeba.
|
||||
- For the GCP portion: `brew install google-cloud-sdk`
|
||||
- For `etcd`: `brew install etcd`
|
||||
- Infrakit: Clone [infrakit](https://github.com/docker/infrakit) and
|
||||
|
@ -1,57 +1,33 @@
|
||||
This directory contains scripts/files to bootstrap a `etcd` cluster.
|
||||
This directory contains scripts/files to bootstrap a `etcd` cluster both on the local machine as well as on Google Cloud.
|
||||
|
||||
In the local, hyperkit based, setup, we use a `etcd` running in a
|
||||
Docker for Mac container to bootstrap the cluster. For a cloud based demo, we'd use `https://discovery.etcd.io`. The host/DfM side is setup with [dfm-setup.sh](./dfm-setup.sh).
|
||||
An `etcd` cluster can be bootstrapped in different ways (see the [Documentatiob](https://coreos.com/etcd/docs/latest/op-guide/clustering.html) for more details. For the demo we use configuration via static IP addresses. With Infrakit these are managed by assigning `LogicalID`s to cluster members. The `LogicalID` is interpreted as a IP address.
|
||||
|
||||
The moby `etcd` package is build with [build-pkg.sh](./build-pkg.sh). It take the official `etcd` container and adds a [script](./etcd.sh) to start `etcd`.
|
||||
The moby `etcd` package is build with [build-pkg.sh](./build-pkg.sh). It takes the official `etcd` container and adds a [script](./etcd.sh) to start `etcd`. [etcd.sh](./etcd.sh) first attempts to join a new cluster. If that fails it attempts to join an existing cluster. Note, the number and members of the cluster are somewhat hard coded in the script.
|
||||
|
||||
|
||||
## Simple single node cluster (OUTDATED)
|
||||
## Preparation
|
||||
|
||||
- Edit `./dfm-setup.sh` and set `NUMPEERS` to `1`
|
||||
- Start the etcd bootstrap container in on window:
|
||||
```
|
||||
./dfm-setup.sh
|
||||
```
|
||||
|
||||
- In another window build/run the moby image:
|
||||
- Build the `etcd` image and then moby image:
|
||||
```
|
||||
./build-pkg.sh
|
||||
moby build etcd
|
||||
moby run etcd
|
||||
```
|
||||
|
||||
## InfraKit cluster setup (OUTDATED)
|
||||
|
||||
This should create a HyperKit based, InfraKit managed `etcd` cluster with 5 `etcd` instances.
|
||||
This should create a HyperKit based, InfraKit managed `etcd` cluster with 3 `etcd` instances.
|
||||
|
||||
#### Infrakit setup
|
||||
You need the [infrakit](https://github.com/docker/infrakit) binaries for this. I normally compile from source using `make build-in-container`. The below was tried with commit `cb420e3e50ea60afe58538b1d3cab1cb14059433`.
|
||||
|
||||
- Make sure you start from scratch
|
||||
```
|
||||
rm -rf ~/.infrakit
|
||||
```
|
||||
- Start the infrakit plugins, each in it's own window from the root of the infrakit source tree:
|
||||
```
|
||||
infrakit-group-default
|
||||
```
|
||||
```
|
||||
infrakit-flavor-vanilla
|
||||
```
|
||||
- Start the hyperkit instance plugin from this directory:
|
||||
Start InfraKit:
|
||||
```
|
||||
infrakit-flavor-vanilla &
|
||||
infrakit-group-default &
|
||||
../../../bin/infrakit-instance-hyperkit
|
||||
```
|
||||
|
||||
#### etcd setup
|
||||
Note: The HyperKit InfraKit plugin must be started from the directory
|
||||
where the `etcd` mobylinux image is located.
|
||||
|
||||
- Start the bootstrap `etcd`:
|
||||
```
|
||||
./dfm-setup.sh
|
||||
```
|
||||
|
||||
- Commit the infrakit config:
|
||||
Now, commit the new config:
|
||||
```
|
||||
infrakit group commit infrakit.json
|
||||
```
|
||||
@ -59,7 +35,7 @@ infrakit group commit infrakit.json
|
||||
To check if everything is fine, note down the IP address from one of
|
||||
the nodes and then:
|
||||
```
|
||||
docker run --rm -t quay.io/coreos/etcd:v3.1.5 etcdctl --endpoints http://192.168.65.24:2379 member list
|
||||
docker run --rm -t quay.io/coreos/etcd:v3.1.5 etcdctl --endpoints http://192.168.65.200:2379 member list
|
||||
```
|
||||
|
||||
## Infrakit GCP setup
|
||||
|
Loading…
Reference in New Issue
Block a user