typesafehub / conductr-cli

CLI for Lightbend ConductR
Other
16 stars 21 forks source link

OCI-in-Docker feature is now a default feature on Linux #459

Closed longshorej closed 7 years ago

longshorej commented 7 years ago

This PR ensures that the OCI-in-Docker feature is enabled by default on Linux. We want to minimize friction for running the developer sandbox. Without this change, users of the sandbox would have to make an entry in their sudoers file. Additionally, this change ensures the developer experience between macOS and Linux are more similar.

This inverts the logic and allows us to disable via --no-default-features. It remains mandatory on macOS; thus --no-default-features does not affect OCI-in-Docker on that operating system.

Manual Test

Description

Start the sandbox with default arguments and ensure that the message indicating OCI-in-Docker is printed. Then, start the sandbox with --no-default-features and ensure that the message indicating OCI-in-Docker is not printed.

Test enabled by default

$ sandbox run 0.1.0
|------------------------------------------------|
| Stopping ConductR                              |
|------------------------------------------------|
ConductR core pid 28581 stopped
ConductR agent pid 28685 stopped
ConductR has been successfully stopped
|------------------------------------------------|
| Starting ConductR                              |
|------------------------------------------------|
Extracting ConductR core to /home/longshorej/.conductr/images/core
Extracting ConductR agent to /home/longshorej/.conductr/images/agent
Starting ConductR core instance on 192.168.10.1..
Waiting for ConductR to start.
Starting ConductR agent instance on 192.168.10.1..
|------------------------------------------------|
| Starting HAProxy                               |
|------------------------------------------------|
Exposing the following ports [80, 443, 3000, 5601, 8999, 9000, 9200, 9999]
6f9cf54e05838c33f64799c561aed7410b52688e1c4d3511dcb67109baaa9a3c
Deploying bundle conductr-haproxy with configuration conductr-haproxy-dev-mode
Retrieving bundle..
Loading bundle from cache typesafe/bundle/conductr-haproxy
Bintray credentials loaded from /home/longshorej/.lightbend/commercial.credentials
Retrieving from cache /home/longshorej/.conductr/cache/bundle/conductr-haproxy-v2-bdfa43d7ade7456af30a95e9ef4bce863d3029dc58b6824f5783881297d1983b.zip
Retrieving configuration..
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-dev-mode
Bintray credentials loaded from /home/longshorej/.lightbend/commercial.credentials
Retrieving from cache /home/longshorej/.conductr/cache/configuration/conductr-haproxy-dev-mode-v2-e5f35046d59c27f4cfeebcc026f3e3b76e027b15223a8961b59d728e559402e2.zip
Loading bundle to ConductR..
[#################################################] 100%
Bundle bdfa43d7ade7456af30a95e9ef4bce86-e5f35046d59c27f4cfeebcc026f3e3b7 is installed
Bundle loaded.
Bundle run request sent.
Bundle bdfa43d7ade7456af30a95e9ef4bce86-e5f35046d59c27f4cfeebcc026f3e3b7 waiting to reach expected scale 1
Bundle bdfa43d7ade7456af30a95e9ef4bce86-e5f35046d59c27f4cfeebcc026f3e3b7 has scale 0, expected 1...
Bundle bdfa43d7ade7456af30a95e9ef4bce86-e5f35046d59c27f4cfeebcc026f3e3b7 expected scale 1 is met
|------------------------------------------------|
| Starting OCI-in-Docker support                 |
|------------------------------------------------|
OCI-in-Docker provided by image lightbend-docker-registry.bintray.io/conductr/oci-in-docker:0.1.0
|------------------------------------------------|
| Starting logging feature based on eslite       |
|------------------------------------------------|
Deploying bundle eslite..
Retrieving bundle..
Loading bundle from cache typesafe/bundle/eslite
Bintray credentials loaded from /home/longshorej/.lightbend/commercial.credentials
Retrieving from cache /home/longshorej/.conductr/cache/bundle/eslite-v1-7dc78f8c80474dc7ff4cabbdf5b5ce386cdebc3bd52693601bd2383dfb4e86be.zip
Loading bundle to ConductR..
[#################################################] 100%
Bundle 7dc78f8c80474dc7ff4cabbdf5b5ce38 is installed
Bundle loaded.
Bundle run request sent.
Bundle 7dc78f8c80474dc7ff4cabbdf5b5ce38 waiting to reach expected scale 1
Bundle 7dc78f8c80474dc7ff4cabbdf5b5ce38 has scale 0, expected 1.
Bundle 7dc78f8c80474dc7ff4cabbdf5b5ce38 expected scale 1 is met
|------------------------------------------------|
| Summary                                        |
|------------------------------------------------|
|- - - - - - - - - - - - - - - - - - - - - - - - |
| ConductR                                       |
|- - - - - - - - - - - - - - - - - - - - - - - - |
ConductR has been started:
  core instance on 192.168.10.1
  agent instance on 192.168.10.1
ConductR service locator has been started on:
  192.168.10.1:9008
|- - - - - - - - - - - - - - - - - - - - - - - - |
| Proxy                                          |
|- - - - - - - - - - - - - - - - - - - - - - - - |
HAProxy has been started
By default, your bundles are accessible on:
  192.168.10.1:9000
|- - - - - - - - - - - - - - - - - - - - - - - - |
| Bundles                                        |
|- - - - - - - - - - - - - - - - - - - - - - - - |
Check latest bundle status with:
  conduct info
Current bundle status:
Licensed To: cc64df31-ec6b-4e08-bb6b-3216721a56b@lightbend
Max ConductR agents: 3
ConductR Version(s): 0.1.0, 2.1.*
Grants: akka-sbr, cinnamon, conductr

ID               NAME              TAG  #REP  #STR  #RUN  ROLES
bdfa43d-e5f3504  conductr-haproxy          1     0     1  haproxy
7dc78f8          eslite                    1     0     1  elasticsearch
-> 0

Test not enabled with --no-default-features

$ sandbox run 0.1.0 --no-default-features
|------------------------------------------------|
| Stopping HAProxy                               |
|------------------------------------------------|
sandbox-haproxy
HAProxy has been successfully stopped
|------------------------------------------------|
| Stopping ConductR                              |
|------------------------------------------------|
ConductR core pid 30458 stopped
ConductR agent pid 30584 stopped
ConductR has been successfully stopped
|------------------------------------------------|
| Starting ConductR                              |
|------------------------------------------------|
Extracting ConductR core to /home/longshorej/.conductr/images/core
Extracting ConductR agent to /home/longshorej/.conductr/images/agent
Starting ConductR core instance on 192.168.10.1..
Waiting for ConductR to start.
Starting ConductR agent instance on 192.168.10.1..
|------------------------------------------------|
| Summary                                        |
|------------------------------------------------|
|- - - - - - - - - - - - - - - - - - - - - - - - |
| ConductR                                       |
|- - - - - - - - - - - - - - - - - - - - - - - - |
ConductR has been started:
  core instance on 192.168.10.1
  agent instance on 192.168.10.1
ConductR service locator has been started on:
  192.168.10.1:9008
|- - - - - - - - - - - - - - - - - - - - - - - - |
| Proxy                                          |
|- - - - - - - - - - - - - - - - - - - - - - - - |
HAProxy has not been started
To enable proxying ensure Docker is running and restart the sandbox
|- - - - - - - - - - - - - - - - - - - - - - - - |
| Bundles                                        |
|- - - - - - - - - - - - - - - - - - - - - - - - |
Check latest bundle status with:
  conduct info
Current bundle status:
Licensed To: cc64df31-ec6b-4e08-bb6b-3216721a56b@lightbend
Max ConductR agents: 3
ConductR Version(s): 0.1.0, 2.1.*
Grants: akka-sbr, cinnamon, conductr

ID  NAME  TAG  #REP  #STR  #RUN  ROLES
-> 0
edwardcallahan commented 7 years ago

Nice comments. Maybe add something to the Readme as well/instead?

longshorej commented 7 years ago

Thanks for the feedback @edwardcallahan - I added a note about features in README.

longshorej commented 7 years ago

Rationale added