Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current version doesn't work as docked, or docs unclear #2

Open
squillace opened this issue Sep 8, 2019 · 4 comments
Open

Current version doesn't work as docked, or docs unclear #2

squillace opened this issue Sep 8, 2019 · 4 comments

Comments

@squillace
Copy link
Contributor

The README doesn't describe a working process, and the steps for the creds may be unclear, but here's the error when I pull it and try to install it after cloning and then generating a cred from the bundle in MASTER, as below.

My current guess is that I'm munging the concepts of the "do access key" -- for which I apparently only pass the name? in addition, the current porter.yaml file has this:

--host-bucket=%(bucket)s.{{bundle.parameters.region}}.digitaloceanspaces.com"

Um, don't we mean to escape the "bucket)s" part?

 🔋 44% (1:50)  porter install --tag jeremyrickard/porter-do-bundle:v0.3.10 -c spring-music --param space_name=cnab --param namespace=cnab                                         1 ↵  9011  09:54:50
installing spring-music...
executing install action from spring-music (bundle instance: spring-music) defined in /cnab/app/porter.yaml
s3cmd create bucket
ERROR: S3 error: 400 (InvalidRequest): Malformed request
Error: error running command /usr/bin/s3cmd s3cmd mb s3://******* --access_key=*******-storage --secret_key=******* --host=nyc3.digitaloceanspaces.com --host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com: exit status 11
err: error running command /usr/bin/s3cmd s3cmd mb s3://******* --access_key=*******-storage --secret_key=******* --host=nyc3.digitaloceanspaces.com --host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com: exit status 11
Error: mixin execution failed: exit status 1
Error: failed to install the bundle: container exit code: 1, message: <nil>

and if I build it from scratch, and THEN install:

 🔋 42% (1:47)  porter install spring-music -c spring-music --param space_name=cnab --param namespace=cnab                                                                           ✔  9016  09:58:46
installing spring-music...
executing install action from spring-music (bundle instance: spring-music) defined in /cnab/app/porter.yaml
s3cmd create bucket
ERROR: S3 error: 400 (InvalidRequest): Malformed request
err: error running command /usr/bin/s3cmd s3cmd mb s3://******* --access_key=*******-storage --secret_key=******* --host=nyc3.digitaloceanspaces.com --host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com: exit status 11
Error: error running command /usr/bin/s3cmd s3cmd mb s3://******* --access_key=*******-storage --secret_key=******* --host=nyc3.digitaloceanspaces.com --host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com: exit status 11
Error: mixin execution failed: exit status 1
Error: failed to install the bundle: container exit code: 1, message: <nil>
@squillace
Copy link
Contributor Author

and the --debug enabled:

 🔋 32% (2:06)  porter install spring-music -c spring-music --param space_name=cnab --param namespace=cnab --debug                                                                 1 ↵  9021  10:26:12
installing spring-music...
installing bundle spring-music (.cnab/bundle.json) as spring-music
	params: [helm_release namespace node_count porter-debug region space_name database_name]
	creds: [do_spaces_secret kubeconfig do_access_token do_spaces_key]
DEBUG: defaulting debug to PORTER_DEBUG (true)
DEBUG: defaulting action to CNAB_ACTION (install)
executing install action from spring-music (bundle instance: spring-music) defined in /cnab/app/porter.yaml
s3cmd create bucket
DEBUG mixin:    exec
DEBUG mixinDir: /*******/app/mixins/exec
DEBUG file:
DEBUG stdin:
install:
- exec:
    arguments:
    - mb
    - s3://*******
    - --access_key=*******-storage
    - --secret_key=*******
    - --host=nyc3.digitaloceanspaces.com
    - --host-bucket=*******.nyc3.digitaloceanspaces.com
    command: s3cmd
    description: s3cmd create bucket

/*******/app/mixins/exec/exec-runtime /*******/app/mixins/exec/exec-runtime install --debug
DEBUG Parsed Input:
&exec.Action{Steps:[]exec.Step{exec.Step{Instruction:exec.Instruction{Description:"s3cmd create bucket", Command:"s3cmd", Arguments:[]string{"mb", "s3://*******", "--access_key=*******-storage", "--secret_key=*******", "--host=nyc3.digitaloceanspaces.com", "--host-bucket=*******.nyc3.digitaloceanspaces.com"}, Flags:builder.Flags(nil), Outputs:[]exec.Output(nil)}}}}
/usr/bin/s3cmd s3cmd mb s3://******* --access_key=*******-storage --secret_key=******* --host=nyc3.digitaloceanspaces.com --host-bucket=*******.nyc3.digitaloceanspaces.com
ERROR: S3 error: 400 (InvalidRequest): Malformed request

@squillace
Copy link
Contributor Author

that's after repairing the strange (bundle)s. string in porter and then running it from source.

@jeremyrickard
Copy link
Owner

Yeah, I have a README update to push. Apologies, I haven’t had a chance to do that given everything else I’ve been trying to pull together

@jeremyrickard
Copy link
Owner

@squillace you shouldn't need to change anything with:

 - "--host-bucket=%(bucket)s.{{bundle.parameters.region}}.digitaloceanspaces.com"

That is indeed the strange format (where we are just replacing the region.

I believe your error is related to credentials. I've updated the README.md, please give that a look and see if it is any clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants