Trying out etcd v3 API from Scala
docker-machine
or Docker nativesbt
The development environment is macOS with HomeBrew but that shouldn't matter.
Until coreos/jetcd is properly published, we need to build and install a local copy of it:
$ git clone https://github.com/coreos/jetcd.git
$ cd jetcd
$ mvn install -DskipTests
That installs coreos/jetcd
in the local Maven.
Launch Docker (for docker-machine
):
$ docker-machine start default
$ eval $(docker-machine env)
$ sbt test
The tests should pass.
This launches a local etcd3 instance, for the duration of the tests, and runs the stated tests against it.
If you see the error:
[info] test.EtcdV3Test *** ABORTED ***
java.lang.RuntimeException: Cannot run all required containers
..the reason is likely that your docker-machine
is out-of-date. Run this:
$ docker-machine upgrade default
$ eval $(docker-machine env)
Try sbt test
again.
If you still get the same error, try to launch etcd manually (see docs for instructions).
$ docker run quay.io/coreos/etcd:v3.1.0