-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add jumpbox clone command to dev tool #2054
Conversation
dev_tool/src/jumpbox.ts
Outdated
|
||
if (jumpboxStartState !== 80) { | ||
console.info('Jumpbox is not stopped yet. waiting to start it') | ||
// wait for it to be running |
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 think we're waiting for it to be stopped here? Probably should just fix that comment.
dev_tool/src/jumpbox.ts
Outdated
return startedInstance | ||
} | ||
|
||
async function ensureWhitelistIP( |
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.
Not to be that sjw, but I think people like to use "allowlist"/"blocklist" more recently.
dev_tool/src/jumpbox.ts
Outdated
await ssh.connect({ | ||
host: jumpboxIP, | ||
username: 'ubuntu', | ||
privateKeyPath: '/Users/macrae/.ssh/wml_jumpbox', |
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.
Hmm, we're going to need to use each individual's private key here. I looked at the lib and it seems to require a path. There's another lib that can read from ssh-agent, but we should probably think about what to do here.
services/postgres/serverless.yml
Outdated
@@ -181,7 +184,11 @@ resources: | |||
UserData: | |||
Fn::Base64: !Sub | | |||
#!/bin/bash | |||
apt update && apt install unzip postgresql postgresql-contrib -y | |||
# get apt data for postgres-14 | |||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' |
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.
Don't really need a sudo here as everything runs as root.
One thing though is that the user data scripts only get run once and it's at time of creation, so we should make sure we cycle the machines so this gets applied on dev/val/prod VMs.
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've already run this on the existing jump boxes, should we be cycling these automatically?
YAY! A few comments and TODOs from running through things
|
Summary
This PR adds a subcommand to ./dev to allow cloning down a db from dev/val/prod to your local machine
Related issues
https://qmacbis.atlassian.net/browse/MCR-2633