NooBskie
NooBskie

Reputation: 3841

How to chain commands that are not fully completed

I have 5 worker servers on AWS that I have to deploy code to everyday usually by just doing this

eb deploy production-cron
eb deploy production-payments

etc..

the output for the full process is like so:

➜  backend git:(master) eb deploy production-payments
Creating application version archive "app-8726-190425_144820".
Uploading: [##################################################] 100% Done...
-- Events -- (safe to Ctrl+C) Use "eb abort" to cancel the command.
2019-04-25 06:48:34    INFO    Environment update is starting.      
2019-04-25 06:49:16    INFO    Deploying new version to instance(s).
2019-04-25 06:49:53    INFO    Successfully loaded 16 scheduled tasks from cron.yaml.
2019-04-25 06:50:17    INFO    New application version was deployed to running EC2 instances.
2019-04-25 06:50:17    INFO    Environment update completed successfully.

Alert: An update to the EB CLI is available. Run "pip install --upgrade awsebcli" to get the latest version.

I know i can chain commands like eb deploy production-cron && eb deploy production-payments

but this will require me to wait for the first command to fully finish

Basically I want to be able to chain these commands then whenever

-- Events -- (safe to Ctrl+C) Use "eb abort" to cancel the command.

pops up I want to ctrl+c and start the next deployment.

If someone knows how to deploy to multiple environments with aws eb command that is even better

Upvotes: 1

Views: 42

Answers (1)

hendry
hendry

Reputation: 10813

Perhaps using a terminal multiplexer like tmux?

tmux split-window 'exec eb deploy production-cron'
tmux split-window 'exec eb deploy production-payments'

That starts the command in a separate window, and once done, it cleans up. Or maybe exec is sufficient for you. Didn't quite understand your Ctrl+C interaction.

Upvotes: 1

Related Questions