typesafehub / conductr-cli

CLI for Lightbend ConductR
Other
16 stars 21 forks source link

Introduce S3 Resolver #490

Closed fsat closed 7 years ago

fsat commented 7 years ago

Provide additional resolver which will be able to resolve a given S3 URL:

s3://<bucket name>/<key to bundle or configuration zip>

The S3 resolver relies on AWS provided boto3 library which has been added as dependency.

Boto3 PyInstaller Notes

Some workaround is in place to ensure boto3 is included correctly into native executable. This is required due to PyInstaller's boto3 hooks importing incorrect module name:

https://github.com/pyinstaller/pyinstaller/issues/2384

Fix is scheduled for PyInstaller 3.3, and the workaround should be able to be removed afterwards.

Additionally, boto3 in native executable requires having the module configparser to be declared as hidden import.

Modification to resolver mechanism

Resolver now declares supported_schemes() which returns a list of URI schemes supported by a particular resolver, i.e. file, http, or urn:x-bundle.

Applicable URI schemes is now derived from the input URI. The applicable schemes derived from the input URI is compared against the URI schemes supported by each resolver, and the resolver chain is filtered based on the result of this comparison.


fsat commented 7 years ago

Provide an s3 resolver for the CLI

fsat commented 7 years ago

Manual Test: S3 Download

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0-alpha.1 --no-default-features

Clear the items from cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Conduct load now accepts S3 URL as input. S3 download displays the progress bar.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Subsequent call loads the artefact from cache.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual Test: S3 Download with Native Executable

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0-alpha.1 --no-default-features

Build the the native executable.

+ echo 'Rebuild native executable'
Rebuild native executable

+ cd /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli

+ rm dist/conduct

+ pyinstaller --onefile conduct.spec
63 INFO: PyInstaller: 3.2.1
63 INFO: Python: 3.5.2
69 INFO: Platform: Darwin-15.3.0-x86_64-i386-64bit
71 INFO: UPX is not available.
73 INFO: Extending PYTHONPATH with paths
['/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli',
 '/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli']
73 INFO: checking Analysis
91 INFO: Building because /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/conductr_cli/resolvers/uri_resolver.py changed
92 INFO: Initializing module dependency graph...
93 INFO: Initializing module graph hooks...
96 INFO: Analyzing base_library.zip ...
2336 INFO: Analyzing hidden import 'configparser'
2371 INFO: running Analysis out00-Analysis.toc
2380 INFO: Caching module hooks...
2385 INFO: Analyzing conductr_cli/conduct.py
3811 INFO: Processing pre-safe import module hook   six.moves
3958 INFO: Processing pre-find module path hook   distutils
6831 INFO: Loading module hooks...
6831 INFO: Loading module hook "hook-pkg_resources.py"...
7147 INFO: Loading module hook "hook-lib2to3.py"...
7158 INFO: Loading module hook "hook-xml.py"...
7202 INFO: Loading module hook "hook-requests.py"...
7206 INFO: Loading module hook "hook-encodings.py"...
7278 INFO: Loading module hook "hook-sysconfig.py"...
7282 INFO: Loading module hook "hook-pydoc.py"...
7283 INFO: Loading module hook "hook-certifi.py"...
7285 INFO: Loading module hook "hook-jsonschema.py"...
7286 INFO: Loading module hook "hook-botocore.py"...
7352 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
7353 INFO: Loading module hook "hook-boto3.py"...
7807 INFO: Loading module hook "hook-distutils.py"...
7849 INFO: Looking for ctypes DLLs
7855 WARNING: library user32 required via ctypes not found
7871 INFO: Analyzing run-time hooks ...
7881 INFO: Including run-time hook 'pyi_rth_pkgres.py'
7897 INFO: Looking for dynamic libraries
7974 INFO: Looking for eggs
7974 INFO: Using Python library /Users/felixsatyaputra/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/Python
7980 INFO: Warnings written to /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/warnconduct.txt
8031 INFO: checking PYZ
8038 INFO: Building because toc changed
8038 INFO: Building PYZ (ZlibArchive) /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/out00-PYZ.pyz
9055 INFO: Building PYZ (ZlibArchive) /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/out00-PYZ.pyz completed successfully.
9081 INFO: checking PKG
9086 INFO: Building because toc changed
9086 INFO: Building PKG (CArchive) out00-PKG.pkg
12376 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
12394 INFO: Bootloader /Users/felixsatyaputra/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyInstaller/bootloader/Darwin-64bit/run
12394 INFO: checking EXE
12399 INFO: Rebuilding out00-EXE.toc because conduct missing
12399 INFO: Building EXE from out00-EXE.toc
12400 INFO: Appending archive to EXE /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
12414 INFO: Fixing EXE for code signing /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
12418 INFO: Building EXE from out00-EXE.toc completed successfully.

Clear the items from cache.

+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Use native executable to invoke the commands. Conduct load now accepts S3 URL as input. S3 download displays the progress bar.

+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Subsequent call loads the artefact from cache.

+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual test: malformed S3 URLs

Manual test is completed successfully.

The following error is displayed if file doesn't exist.

+ conduct load s3://typesafe-test/not-there.zip
Retrieving bundle..
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://typesafe-test/not-there.zip
Error: RESOLVER                            ERROR
Error: Bintray                             's3://typesafe-test/not-there.zip is not a valid bundle uri'
Error: Docker                              HTTPSConnectionPool(host='s3', port=443): Max retries exceeded with url: /v2//typesafe-test/not-there.zip/manifests/latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x1088a80b8>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
Error: conductr_cli.resolvers.s3_resolver  An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.

The following error is displayed if S3 URL is incomplete, i.e. bucket name specified without key.

+ conduct load s3://typesafe-test
Retrieving bundle..
Loading bundle from cache s3://typesafe-test
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle s3://typesafe-test
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Error: Unable to resolve bundle using s3://typesafe-test
Error: RESOLVER                            ERROR
Error: Bintray                             405 Client Error: Method Not Allowed for url: https://api.bintray.com/packages/s3://typesafe-test
Error: Docker                              HTTPSConnectionPool(host='s3', port=443): Max retries exceeded with url: /v2//typesafe-test/manifests/latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10d00d080>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
Error: conductr_cli.resolvers.s3_resolver  'Unable to derive S3 bucket and key from s3://typesafe-test'

The following error is displayed if attempting to access unauthorized S3 URL.

+ conduct load s3://other-bucket/my/bundle.zip
Retrieving bundle..
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://other-bucket/my/bundle.zip
Error: RESOLVER                            ERROR
Error: Bintray                             's3://other-bucket/my/bundle.zip is not a valid bundle uri'
Error: Docker                              HTTPSConnectionPool(host='s3', port=443): Max retries exceeded with url: /v2//other-bucket/my/bundle.zip/manifests/latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104861ac8>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
Error: conductr_cli.resolvers.s3_resolver  An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
fsat commented 7 years ago

Manual Test: offline mode

S3 resolver does not support offline mode.

+ conduct load --offline s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
fsat commented 7 years ago

Manual test: Credentials

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0-alpha.1 --no-default-features

Delete items from cache.

+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Use AWS credentials file containing on [default] credentials.

+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-default /Users/felixsatyaputra/.aws/credentials

The default profile is being used to download successfully.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Using S3 'default' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Using S3 'default' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Delete items from cache for the next test.

+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Use invalid credentials.

+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-invalid /Users/felixsatyaputra/.aws/credentials

The following error message is displayed.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Using S3 'default' profile
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Error: RESOLVER                            ERROR
Error: Bintray                             's3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip is not a valid bundle uri'
Error: Docker                              HTTPSConnectionPool(host='s3', port=443): Max retries exceeded with url: /v2//typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip/manifests/latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10c54cac8>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
Error: conductr_cli.resolvers.s3_resolver  An error occurred (InvalidAccessKeyId) when calling the GetObject operation: The AWS Access Key Id you provided does not exist in our records.
fsat commented 7 years ago

Manual test: Testing other resolvers

Other resolvers still works as expected.

Restart the sandbox.

+ sandbox run 2.1.0-alpha.1 --no-default-features
|------------------------------------------------|
| Stopping ConductR                              |
|------------------------------------------------|
ConductR core pid 60924 stopped
ConductR agent pid 61024 stopped
ConductR has been successfully stopped
|------------------------------------------------|
| Starting ConductR                              |
|------------------------------------------------|
Extracting ConductR core to /Users/felixsatyaputra/.conductr/images/core
Extracting ConductR agent to /Users/felixsatyaputra/.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..
|------------------------------------------------|
| OCI-in-Docker support unavailable.             |
|------------------------------------------------|
|------------------------------------------------|
| To provide support ensure Docker is running    |
| and restart the sandbox                        |
|------------------------------------------------|
|------------------------------------------------|
| 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: 10
ConductR Version(s): 0.1.0, 2.1.*
Grants: akka-sbr, cinnamon, conductr

ID  NAME  TAG  #REP  #STR  #RUN  ROLES

Delete Items from cache.

+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-v2-6cc7dbcf3b655b1942edf50a5574d62f5bbb12ef37db5b3990dc3fa80078b827.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-af62b0db86d9de14cd5580996e456333deeaffaad64176b878cbe49af22e3216
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Bintray resolver works as expected.

+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/visualizer
Resolving bundle typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/conductr-haproxy-coreos
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

Bintray resolver is able to load from cache successfully.

+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
Retrieving configuration..
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

Docker resolver works as expected.

+ conduct load hello-world
Retrieving bundle..
Loading bundle from cache typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/hello-world
Resolving bundle typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57
    b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 121d945fb29a218a59c8a3034cbe5a8b is installed
Bundle loaded.
Start bundle with:        conduct run 121d945
Unload bundle with:       conduct unload 121d945
Print ConductR info with: conduct info
Print bundle info with:   conduct info 121d945

Docker resolver loads from cache as expected as well.

+ conduct load hello-world
Retrieving bundle..
Loading bundle from cache typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/hello-world
Resolving bundle typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Loading bundle to ConductR..
[##################################################] 100%
Bundle 67e2ff081458aa8b93ebd6c46ff93783 is installed
Bundle loaded.
Start bundle with:        conduct run 67e2ff0
Unload bundle with:       conduct unload 67e2ff0
Print ConductR info with: conduct info
Print bundle info with:   conduct info 67e2ff0

URI resolver works as expected - file URI is used in this case; http URI is tested as part of Bintray resolver since Bintray resolver makes a call to URI resolver to download HTTP address.

+ conduct load /Users/felixsatyaputra/tmp/reactive-maps-backend-summary-v1-d073991ab918ee22c7426af8a62a48c5ebec737f53cfc4bccb0a4f712d76dd6a.zip /Users/felixsatyaputra/tmp/test-config-apples-162232b6a55dc812b5e0550991ecb89ac7e46f4df5e685711c544a91ad02969b.zip
Retrieving bundle..
Retrieving configuration..
Loading bundle to ConductR..
[##################################################] 100%
Bundle d073991ab918ee22c7426af8a62a48c5-162232b6a55dc812b5e0550991ecb89a is installed
Bundle loaded.
Start bundle with:        conduct run d073991-162232b
Unload bundle with:       conduct unload d073991-162232b
Print ConductR info with: conduct info
Print bundle info with:   conduct info d073991-162232b

STDIN resolver works as expected.

+ tar c test-bundle-v0 | shazar | conduct load
Retrieving bundle..
Loading bundle from cache typesafe/bundle/-
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Loading bundle to ConductR..
[##################################################] 100%
Bundle 845bc3ed6e1835b31909b1522a0c886a is installed
Bundle loaded.
Start bundle with:        conduct run 845bc3e
Unload bundle with:       conduct unload 845bc3e
Print ConductR info with: conduct info
Print bundle info with:   conduct info 845bc3e
fsat commented 7 years ago

Manual test: S3 download

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Bundle + configuration is loaded from S3. The conductr profile declared in ~/.aws/credentials is used.

+ echo 'Load from S3'
Load from S3

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Load from cache works as expected.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual test: S3 download with native executable

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features
|------------------------------------------------|
| Stopping ConductR                              |
|------------------------------------------------|
ConductR core pid 89723 stopped
ConductR agent pid 89823 stopped
ConductR has been successfully stopped
|------------------------------------------------|
| Starting ConductR                              |
|------------------------------------------------|
Extracting ConductR core to /Users/felixsatyaputra/.conductr/images/core
Extracting ConductR agent to /Users/felixsatyaputra/.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..
|------------------------------------------------|
| OCI-in-Docker support unavailable.             |
|------------------------------------------------|
|------------------------------------------------|
| To provide support ensure Docker is running    |
| and restart the sandbox                        |
|------------------------------------------------|
|------------------------------------------------|
| 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: 10
ConductR Version(s): 0.1.0, 2.1.*
Grants: akka-sbr, cinnamon, conductr

ID  NAME  TAG  #REP  #STR  #RUN  ROLES

Rebuild the native executable.

+ echo 'Rebuild native executable'
Rebuild native executable
+ cd /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli
+ rm dist/conduct
+ pyinstaller --onefile conduct.spec
40 INFO: PyInstaller: 3.2.1
40 INFO: Python: 3.5.2
44 INFO: Platform: Darwin-15.3.0-x86_64-i386-64bit
46 INFO: UPX is not available.
47 INFO: Extending PYTHONPATH with paths
['/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli',
 '/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli']
48 INFO: checking Analysis
70 INFO: checking PYZ
79 INFO: checking PKG
85 INFO: Bootloader /Users/felixsatyaputra/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyInstaller/bootloader/Darwin-64bit/run
85 INFO: checking EXE
88 INFO: Rebuilding out00-EXE.toc because conduct missing
88 INFO: Building EXE from out00-EXE.toc
89 INFO: Appending archive to EXE /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
105 INFO: Fixing EXE for code signing /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
110 INFO: Building EXE from out00-EXE.toc completed successfully.
+ cd /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Use the native executable, and load from S3.

+ echo 'Load from S3'
Load from S3

+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Loading from cache works as expected.

+ echo 'Load from Cache'
Load from Cache
+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual Test: S3 Credentials

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle*.zip'
+ rm -f '/Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-*.zip'

S3 resolver works with default AWS profile.

+ echo 'Load from S3 using default profile'
Load from S3 using default profile
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-default /Users/felixsatyaputra/.aws/credentials

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'default' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'default' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

S3 resolver will fail if invalid profile is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ echo 'Load from S3 using invalid credentials'
Load from S3 using invalid credentials
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-invalid /Users/felixsatyaputra/.aws/credentials

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'default' profile
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (InvalidAccessKeyId) when calling the GetObject operation: The AWS Access Key Id you provided does not exist in our records.

Put back the correct credentials after test.

+ echo 'Reset credentials'
Reset credentials
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-conductr /Users/felixsatyaputra/.aws/credentials
fsat commented 7 years ago

Manual Test: Malformed S3 URLs

When S3 key points to a non-existent path, the following error is displayed:

+ conduct load s3://typesafe-test/not-there.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://typesafe-test/not-there.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.

When S3 key can't be deduced from the S3 URL, the following error is displayed:

+ conduct load s3://typesafe-test
Retrieving bundle..
Resolving bundle using [s3_resolver]
Error: Unable to resolve bundle using s3://typesafe-test
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  'Unable to derive S3 bucket and key from s3://typesafe-test'

When user has no permission, the following error is displayed:

+ conduct load s3://other-bucket/my/bundle.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://other-bucket/my/bundle.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
fsat commented 7 years ago

Manual Test: Offline S3 resolver

S3 resolver doesn't support offline resolution.

+ conduct load --offline s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
fsat commented 7 years ago

Manual Test: Bintray Resolver

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Simple bundle expression is resolved successfully.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/visualizer
Resolving bundle typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/conductr-haproxy-coreos
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

Loading from cache works as expected.

+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

Similarly offline mode.

+ conduct load --offline visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [offline_resolver, docker_offline_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
Retrieving configuration..
Resolving bundle configuration using [offline_resolver, docker_offline_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

Loading bundle by latest tag works as expected.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ conduct load visualizer:2.1.0 conductr-haproxy-coreos:2.1.0
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving visualizer:2.1.0
Resolving bundle typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving conductr-haproxy-coreos:2.1.0
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

This also works when the full bundle and configuration version is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ conduct load visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606 conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606
Resolving bundle typesafe/bundle/visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

When repo is specified, resolution works as expected.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ conduct load typesafe/bundle/visualizer typesafe/bundle-configuration/conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/typesafe/bundle/visualizer
Resolving bundle typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/typesafe/bundle-configuration/conductr-haproxy-coreos
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

When the full shorthand URN is specified, this is resolved from Bintray successfully.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ conduct load urn:x-bundle:typesafe/bundle/visualizer:2.1.0 urn:x-bundle:typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving urn:x-bundle:typesafe/bundle/visualizer:2.1.0
Resolving bundle typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving urn:x-bundle:typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc
fsat commented 7 years ago

Manual test: Docker resolver

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Docker image can be resolved from simple image name.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/docker*'

+ conduct load hello-world
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/hello-world
Resolving bundle typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57
    b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 96a27437776d46848c356a15dcda7bff is installed
Bundle loaded.
Start bundle with:        conduct run 96a2743
Unload bundle with:       conduct unload 96a2743
Print ConductR info with: conduct info
Print bundle info with:   conduct info 96a2743

Also when namespace is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-af62b0db86d9de14cd5580996e456333deeaffaad64176b878cbe49af22e3216

+ conduct load dockercloud/hello-world
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/dockercloud/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/dockercloud/hello-world
Resolving bundle typesafe/dockercloud/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 964747f1beee16f623d25e3e26a2cc0c is installed
Bundle loaded.
Start bundle with:        conduct run 964747f
Unload bundle with:       conduct unload 964747f
Print ConductR info with: conduct info
Print bundle info with:   conduct info 964747f

Also works when tag is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1

+ conduct load dockercloud/hello-world:latest
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/dockercloud/hello-world:latest
Resolving bundle typesafe/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 1f6c70aba8829b0aeb4c2f76844e545f is installed
Bundle loaded.
Start bundle with:        conduct run 1f6c70a
Unload bundle with:       conduct unload 1f6c70a
Print ConductR info with: conduct info
Print bundle info with:   conduct info 1f6c70a

Also works when the full Docker registry URI is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1

+ conduct load registry.hub.docker.com/dockercloud/hello-world:latest
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache registry.hub.docker.com/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/registry.hub.docker.com/dockercloud/hello-world:latest
Resolving bundle registry.hub.docker.com/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 0518513a9077421c58e518245a22422d is installed
Bundle loaded.
Start bundle with:        conduct run 0518513
Unload bundle with:       conduct unload 0518513
Print ConductR info with: conduct info
Print bundle info with:   conduct info 0518513
fsat commented 7 years ago

Manual Test: Docker resolver w/ 1.0 image

The following error is displayed when trying to load 1.0 Docker image:

+ conduct load tutum/hello-world
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/tutum/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving file:///Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/tutum/hello-world
Resolving bundle typesafe/tutum/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Error: Unable to resolve bundle using tutum/hello-world
Error: RESOLVER  ERROR
Error: URI       <urlopen error [Errno 2] No such file or directory: '/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli-manual-tests/pr-490/tutum/hello-world'>
Error: Bintray   404 Client Error: Not Found for url: https://api.bintray.com/packages/typesafe/tutum/hello-world
Error: Docker    'tutum/hello-world - non-OCI image is not supported'
fsat commented 7 years ago

Manual Test: Other resolvers

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-62a18fe4ecbd671bfe92a874a9ede6e2d9b3973ccd80d50860f24118d127f752
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

When file URI is specified, bundle is resolved and loaded successfully.

+ echo 'Resolve from URI'
Resolve from URI
+ conduct load /Users/felixsatyaputra/tmp/reactive-maps-backend-summary-v1-d073991ab918ee22c7426af8a62a48c5ebec737f53cfc4bccb0a4f712d76dd6a.zip /Users/felixsatyaputra/tmp/test-config-apples-162232b6a55dc812b5e0550991ecb89ac7e46f4df5e685711c544a91ad02969b.zip
Retrieving bundle..
Resolving bundle using [uri_resolver, bintray_resolver]
Retrieving configuration..
Resolving bundle configuration using [uri_resolver, bintray_resolver]
Loading bundle to ConductR..
[##################################################] 100%
Bundle d073991ab918ee22c7426af8a62a48c5-162232b6a55dc812b5e0550991ecb89a is installed
Bundle loaded.
Start bundle with:        conduct run d073991-162232b
Unload bundle with:       conduct unload d073991-162232b
Print ConductR info with: conduct info
Print bundle info with:   conduct info d073991-162232b

STDIN resolver also works as expected.

+ tar c test-bundle-v0 | shazar | conduct load
Retrieving bundle..
Resolving bundle using [stdin_resolver, uri_resolver, bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/-
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Loading bundle to ConductR..
[##################################################] 100%
Bundle 845bc3ed6e1835b31909b1522a0c886a is installed
Bundle loaded.
Start bundle with:        conduct run 845bc3e
Unload bundle with:       conduct unload 845bc3e
Print ConductR info with: conduct info
Print bundle info with:   conduct info 845bc3e
fsat commented 7 years ago

@huntc - it's going to be tricky to do unfortunately because how loose the URL syntax is.

So for example visualizer:2.1.0 - which is a valid bintray shorthand will have visualizer as scheme when parsed using Python's urlparse.

fsat commented 7 years ago

Implemented the change as per feedback:

fsat commented 7 years ago

Manual test is done successfully. I will post the recorded result shortly.

fsat commented 7 years ago

Manual test: S3 download

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

Bundle + configuration is loaded from S3. The conductr profile declared in ~/.aws/credentials is used. Only s3_resolver is in effect.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Load from cache works as expected.

+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual test: S3 download with native executable

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Rebuild the native executable.

+ cd /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli
+ rm dist/conduct
+ pyinstaller --onefile conduct.spec
51 INFO: PyInstaller: 3.2.1
51 INFO: Python: 3.5.2
57 INFO: Platform: Darwin-15.3.0-x86_64-i386-64bit
59 INFO: UPX is not available.
60 INFO: Extending PYTHONPATH with paths
['/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli',
 '/Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli']
61 INFO: checking Analysis
80 INFO: Building because /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/conductr_cli/bundle_shorthand.py changed
80 INFO: Initializing module dependency graph...
81 INFO: Initializing module graph hooks...
82 INFO: Analyzing base_library.zip ...
2834 INFO: Analyzing hidden import 'configparser'
2858 INFO: running Analysis out00-Analysis.toc
2865 INFO: Caching module hooks...
2867 INFO: Analyzing conductr_cli/conduct.py
3078 INFO: Processing pre-safe import module hook   six.moves
4795 INFO: Processing pre-find module path hook   distutils
6880 INFO: Loading module hooks...
6881 INFO: Loading module hook "hook-certifi.py"...
6882 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
6882 INFO: Loading module hook "hook-requests.py"...
6884 INFO: Loading module hook "hook-lib2to3.py"...
6887 INFO: Loading module hook "hook-pydoc.py"...
6887 INFO: Loading module hook "hook-xml.py"...
6939 INFO: Loading module hook "hook-jsonschema.py"...
6941 INFO: Loading module hook "hook-boto3.py"...
7360 INFO: Loading module hook "hook-distutils.py"...
7362 INFO: Loading module hook "hook-sysconfig.py"...
7363 INFO: Loading module hook "hook-encodings.py"...
7431 INFO: Loading module hook "hook-pkg_resources.py"...
7754 INFO: Loading module hook "hook-botocore.py"...
7840 INFO: Looking for ctypes DLLs
7858 WARNING: library user32 required via ctypes not found
7859 INFO: Analyzing run-time hooks ...
7865 INFO: Including run-time hook 'pyi_rth_pkgres.py'
7881 INFO: Looking for dynamic libraries
7943 INFO: Looking for eggs
7944 INFO: Using Python library /Users/felixsatyaputra/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/Python
7949 INFO: Warnings written to /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/warnconduct.txt
7992 INFO: checking PYZ
7997 INFO: Building because toc changed
7997 INFO: Building PYZ (ZlibArchive) /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/out00-PYZ.pyz
9031 INFO: Building PYZ (ZlibArchive) /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/build/conduct/out00-PYZ.pyz completed successfully.
9054 INFO: checking PKG
9059 INFO: Building because toc changed
9059 INFO: Building PKG (CArchive) out00-PKG.pkg
12339 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
12360 INFO: Bootloader /Users/felixsatyaputra/.pyenv/versions/3.5.2/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyInstaller/bootloader/Darwin-64bit/run
12360 INFO: checking EXE
12365 INFO: Rebuilding out00-EXE.toc because conduct missing
12365 INFO: Building EXE from out00-EXE.toc
12365 INFO: Appending archive to EXE /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
12377 INFO: Fixing EXE for code signing /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct
12381 INFO: Building EXE from out00-EXE.toc completed successfully.

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle*.zip'
+ rm -f '/Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-*.zip'

Use the native executable, and load from S3.

+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'conductr' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

Loading from cache works as expected.

+ /Users/felixsatyaputra/workspace/typesafe-fsat/conductr-cli/dist/conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc
fsat commented 7 years ago

Manual Test: S3 Credentials

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle*.zip'
+ rm -f '/Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-*.zip'

S3 resolver works with default AWS profile.

+ echo 'Load from S3 using default profile'
Load from S3 using default profile
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-default /Users/felixsatyaputra/.aws/credentials
+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'default' profile
Retrieving s3://typesafe-testbundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [s3_resolver]
Using S3 'default' profile
Retrieving s3://typesafe-testbundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 7e504bc5225e936e3e4b30691597fcdf-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 7e504bc-4c54ffc
Unload bundle with:       conduct unload 7e504bc-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 7e504bc-4c54ffc

S3 resolver will fail if invalid profile is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ echo 'Load from S3 using invalid credentials'
Load from S3 using invalid credentials
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-invalid /Users/felixsatyaputra/.aws/credentials
+ conduct load s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'default' profile
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (InvalidAccessKeyId) when calling the GetObject operation: The AWS Access Key Id you provided does not exist in our records.

Put back the correct credentials after test.

+ echo 'Reset credentials'
Reset credentials
+ rm -f /Users/felixsatyaputra/.aws/credentials
+ ln -s /Users/felixsatyaputra/.aws/credentials-conductr /Users/felixsatyaputra/.aws/credentials
fsat commented 7 years ago

Manual Test: Malformed S3 URLs

When S3 key points to a non-existent path, the following error is displayed:

+ conduct load s3://typesafe-test/not-there.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://typesafe-test/not-there.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.

When S3 key can't be deduced from the S3 URL, the following error is displayed:

+ conduct load s3://typesafe-test
Retrieving bundle..
Resolving bundle using [s3_resolver]
Error: Unable to resolve bundle using s3://typesafe-test
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  'Unable to derive S3 bucket and key from s3://typesafe-test'

When user has no permission, the following error is displayed:

+ conduct load s3://other-bucket/my/bundle.zip
Retrieving bundle..
Resolving bundle using [s3_resolver]
Using S3 'conductr' profile
Error: Unable to resolve bundle using s3://other-bucket/my/bundle.zip
Error: RESOLVER                            ERROR
Error: conductr_cli.resolvers.s3_resolver  An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
fsat commented 7 years ago

Manual Test: Offline S3 resolver

S3 resolver doesn't support offline resolution.

+ conduct load --offline s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip s3://typesafe-test/bundle-configuration/conductr-haproxy-coreos/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Retrieving bundle..
Error: Unable to resolve bundle using s3://typesafe-test/bundle/test-failing-bundle/test-failing-bundle-7e504bc5225e936e3e4b30691597fcdfac45c49329232f51ecc186f8b4ddc84a.zip
fsat commented 7 years ago

Manual Test: Bintray Resolver

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Simple bundle expression is resolved successfully. Note the resolver chain includes bintray_resolver and docker_resolver - this is because we are specifying bundle shorthand as input.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/visualizer*.zip'
+ rm -f '/Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-*.zip'

+ echo 'Resolve bintray'
Resolve bintray
+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc

Loading from cache works as expected.

+ echo 'Resolve bintray - load from cache'
Resolve bintray - load from cache
+ conduct load visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc

Similarly offline mode. Note offline_resolver and docker_offline_resolver is in the resolver chain.

+ echo 'Resolve bintray - offline'
Resolve bintray - offline
+ conduct load --offline visualizer conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [offline_resolver, docker_offline_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
Retrieving configuration..
Resolving bundle configuration using [offline_resolver, docker_offline_resolver]
Retrieving from cache /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc

Loading bundle by latest tag works as expected.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ echo 'Resolve bintray - latest tag'
Resolve bintray - latest tag

+ conduct load visualizer:2.1.0 conductr-haproxy-coreos:2.1.0
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc

This also works when the full bundle and configuration version is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

+ echo 'Resolve bintray - tag with digest'
Resolve bintray - tag with digest

+ conduct load visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606 conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/visualizer:2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 31fe9536b5f3252cc7b432ab06bd9ba3-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run 31fe953-4c54ffc
Unload bundle with:       conduct unload 31fe953-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info 31fe953-4c54ffc

When repo is specified, resolution works as expected.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-31fe9536b5f3252cc7b432ab06bd9ba31b7258d920f7147020392a7058074606.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
+ echo 'Resolve bintray - repo'
Resolve bintray - repo
+ conduct load typesafe/bundle/visualizer typesafe/bundle-configuration/conductr-haproxy-coreos
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/visualizer
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc

When the full shorthand URN is specified, this is resolved from Bintray successfully. Note that uri_resolver is no longer in the resolver chain.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
+ echo 'Resolve bintray - full urn'
Resolve bintray - full urn

+ conduct load urn:x-bundle:typesafe/bundle/visualizer:2.1.0 urn:x-bundle:typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/visualizer:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle/typesafe/visualizer/2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
[##################################################] 100%
Retrieving configuration..
Resolving bundle configuration using [bintray_resolver, docker_resolver]
Loading bundle configuration from cache typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle configuration typesafe/bundle-configuration/conductr-haproxy-coreos:2.1.0
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving https://dl.bintray.com/typesafe/bundle-configuration/typesafe/conductr-haproxy-coreos/2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle cabaae7cf37b1cf99b3861515cd5e77a-4c54ffc9f886c6dea807382952fe7bab is installed
Bundle loaded.
Start bundle with:        conduct run cabaae7-4c54ffc
Unload bundle with:       conduct unload cabaae7-4c54ffc
Print ConductR info with: conduct info
Print bundle info with:   conduct info cabaae7-4c54ffc
fsat commented 7 years ago

Manual test: Docker resolver

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Docker image can be resolved from simple image name.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-62a18fe4ecbd671bfe92a874a9ede6e2d9b3973ccd80d50860f24118d127f752

+ echo 'Resolve docker'
Resolve docker
+ conduct load hello-world
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/bundle/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57
    b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 1d21fde86b5c7103082adba0cb690b4d is installed
Bundle loaded.
Start bundle with:        conduct run 1d21fde
Unload bundle with:       conduct unload 1d21fde
Print ConductR info with: conduct info
Print bundle info with:   conduct info 1d21fde

Also when namespace is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-af62b0db86d9de14cd5580996e456333deeaffaad64176b878cbe49af22e3216
+ echo 'Resolve docker with namespace'
Resolve docker with namespace
+ conduct load dockercloud/hello-world
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/dockercloud/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/dockercloud/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle a1c5ac2ec5fdcc982d838300cd0708aa is installed
Bundle loaded.
Start bundle with:        conduct run a1c5ac2
Unload bundle with:       conduct unload a1c5ac2
Print ConductR info with: conduct info
Print bundle info with:   conduct info a1c5ac2

Also works when tag is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1

+ echo 'Resolve docker with tag'
Resolve docker with tag
+ conduct load dockercloud/hello-world:latest
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle da9e13e333cffdfa0a1206baf4ce8e1c is installed
Bundle loaded.
Start bundle with:        conduct run da9e13e
Unload bundle with:       conduct unload da9e13e
Print ConductR info with: conduct info
Print bundle info with:   conduct info da9e13e

Also works when the shorthand specifying Docker registry URI is specified.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1
+ echo 'Resolve docker with full URL'
Resolve docker with full URL
+ conduct load registry.hub.docker.com/dockercloud/hello-world:latest
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache registry.hub.docker.com/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle registry.hub.docker.com/dockercloud/hello-world:latest
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Retrieving Docker layers:
    0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9
    486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611
    03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141
    101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a
    1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13
    8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91
    f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61
[##################################################] 100%
Loading bundle to ConductR..
[##################################################] 100%
Bundle 86a809c87460f526fde5d33b937a9d93 is installed
Bundle loaded.
Start bundle with:        conduct run 86a809c
Unload bundle with:       conduct unload 86a809c
Print ConductR info with: conduct info
Print bundle info with:   conduct info 86a809c
fsat commented 7 years ago

Manual Test: Docker resolver w/ 1.0 image

The following error is displayed when trying to load 1.0 Docker image:

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f '/Users/felixsatyaputra/.conductr/cache/bundle/docker*'

+ echo 'Load non-oci docker image'
Load non-oci docker image
+ conduct load tutum/hello-world
Retrieving bundle..
Resolving bundle using [bintray_resolver, docker_resolver]
Loading bundle from cache typesafe/tutum/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Resolving bundle typesafe/tutum/hello-world
Bintray credentials loaded from /Users/felixsatyaputra/.lightbend/commercial.credentials
Error: Unable to resolve bundle using tutum/hello-world
Error: RESOLVER  ERROR
Error: Bintray   404 Client Error: Not Found for url: https://api.bintray.com/packages/typesafe/tutum/hello-world
Error: Docker    'tutum/hello-world - 1.0 manifests are not supported'
fsat commented 7 years ago

Manual Test: Other resolvers

Manual test is completed successfully.

Restart the sandbox.

+ sandbox run 2.1.0 --no-default-features

Clear the cache.

+ echo 'Clear items from cache'
Clear items from cache
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/visualizer-2.1.0-cabaae7cf37b1cf99b3861515cd5e77a16fa9638e225fa234929cc1d46dde937.zip
+ rm -f /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_03374a673b41ab3f5fad8dea517c90dfaa0961230fc58f71a469dcc0d5f50141 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_0b898a637c19af383cfc5740f7796e4a9bdcf60e7af31833d2979ea7849624f9 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_101d2c41032c7dacc0877d6c6a6a72e7c44d430924230b22c9a9c961b4a12b5a /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_1252e1f36d2b01dcee9b25f715e319271cebde06b50939f42d80ffb09e13cb13 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_486a8e636d6250a74d15cdb3582f4dd198271a80118f5a2f59de3d9cd8433611 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_8385bb1a4377cfc56ebd0c84d94d9b134f82254a712f0ca1af91ab3517d43a91 /Users/felixsatyaputra/.conductr/cache/bundle/docker-blob-sha256_f29c06131731a30b702d603e73857831743a3f96f7b2cb2fc57f25e44264ee61 /Users/felixsatyaputra/.conductr/cache/bundle/docker-manifest-2c996077856227bae99568bac8e055b2e2b7c8207f0cf9f9aec3d743470b03c1
+ rm -f /Users/felixsatyaputra/.conductr/cache/configuration/conductr-haproxy-coreos-2.1.0-4c54ffc9f886c6dea807382952fe7bab9c884953c2ea00b8e44771d7dbf9203c.zip

When file URI is specified, bundle is resolved and loaded successfully. Note that only uri_resolver is within the resolver chain - this is because the input is no longer considered to be a valid bundle shorthand.

+ echo 'Resolve from URI'
Resolve from URI
+ conduct load /Users/felixsatyaputra/tmp/reactive-maps-backend-summary-v1-d073991ab918ee22c7426af8a62a48c5ebec737f53cfc4bccb0a4f712d76dd6a.zip /Users/felixsatyaputra/tmp/test-config-apples-162232b6a55dc812b5e0550991ecb89ac7e46f4df5e685711c544a91ad02969b.zip
Retrieving bundle..
Resolving bundle using [uri_resolver]
Retrieving configuration..
Resolving bundle configuration using [uri_resolver]
Loading bundle to ConductR..
[##################################################] 100%
Bundle d073991ab918ee22c7426af8a62a48c5-162232b6a55dc812b5e0550991ecb89a is installed
Bundle loaded.
Start bundle with:        conduct run d073991-162232b
Unload bundle with:       conduct unload d073991-162232b
Print ConductR info with: conduct info
Print bundle info with:   conduct info d073991-162232b

STDIN resolver also works as expected. Note that only stdin_resolver is in the resolver chain.

+ echo 'Scenario: Resolve from STDIN'
Scenario: Resolve from STDIN
+ tar c test-bundle-v0 | shazar | conduct load
Retrieving bundle..
Resolving bundle using [stdin_resolver]
Loading bundle to ConductR..
[##################################################] 100%
Bundle 845bc3ed6e1835b31909b1522a0c886a is installed
Bundle loaded.
Start bundle with:        conduct run 845bc3e
Unload bundle with:       conduct unload 845bc3e
Print ConductR info with: conduct info
Print bundle info with:   conduct info 845bc3e