-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: OAS-19: Add base node cli #18
Conversation
bin/capsule.js
Outdated
@@ -0,0 +1,62 @@ | |||
#!/usr/bin/env node | |||
//############################################################################# | |||
// @licence: ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MIT
bin/capsule.js
Outdated
const loadAWSConfiguration = async (config_path, aws_profile) => { | ||
// Environment variables should have higher precedence | ||
// Reference: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html | ||
if ((process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) || process.env.AWS_PROFILE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest moving all env declarations at the top so it's clearer which env vars are needed
const {
// AWS Access Key
AWS_ACCESS_KEY_ID,
// AWS secret key
AWS_SECRET_ACCESS_KEY,
// AWS profile name
AWS_PROFILE,
} = process.env;
Which version of node do you use? I like that you added npm shrinkwrap, but maybe it's easier for development (at this point) to use package-lock.json. @facundovictor this is an excellent PR here! |
Thanks @grgur , I'll apply the changes and add the node version into the package.json. I used latest node v10.8.0, though, we should try setting up tests with mocha and different docker images with different node versions. |
This PR includes:
Next thing to add:
--init
should create a bucket if does not exist and should upload the templates.--apply
should try creating the stack if it does not exist or update it using the templates stored in s3We need to decide: