etcd - sinherle/Recipes GitHub Wiki
etcd v2.3.1 has been successfully built and tested for Linux on z Systems. The following instructions can be used for RHEL 7.1 , SLES 12 and UBUNTU.
-
Go — Instructions for building Go can be found [here](https://github.com/linux-on-ibm-z/docs/wiki/Building-Go).
-
(For UBUNTU System) Use the following commands to obtain dependencies
2. Get etcd v2.3.1 source code from githubsudo apt-get update sudo apt-get install wget golang
$ wget https://github.com/coreos/etcd/archive/v2.3.1.tar.gz
-
Untar and cd to the work directory
$ tar zxvf v2.3.1.tar.gz $ cd etcd-2.3.1
-
Check go version
$ go version
-
Following changes are needed for the build to work
Update the file `./etcdmain/etcd_phony.go`
// +build ignore
_**Note:** We changed `// +build !amd64` to `// +build ignore`_
Update the file `./etcdmain/etcd.go`
// +build s390x
_**Note:** We changed `// +build amd64` to `// +build s390x`_ 6. Build etcd
$ ./build
-
Test etcd
First start a single-member cluster of etcd:
$ ./bin/etcd
This will bring up etcd listening on port 2379 for client communication and on port 2380 for server-to-server communication.
Next, let's set a single key, and then retrieve it:
$ curl -L http://127.0.0.1:2379/v2/keys/mykey -XPUT -d value="this is awesome" $ curl -L http://127.0.0.1:2379/v2/keys/mykey
You have successfully started an etcd and written a key to the store. ### References: https://coreos.com/etcd/