bash-my-aws / bash-my-aws Goto Github PK
View Code? Open in Web Editor NEWBash-my-AWS provides simple but powerful CLI commands for managing AWS resources
Home Page: https://bash-my-aws.org/
License: MIT License
Bash-my-AWS provides simple but powerful CLI commands for managing AWS resources
Home Page: https://bash-my-aws.org/
License: MIT License
There is a ton of noise in the completion suggestions because we are returning more than just the resource names. Maybe add a custom --query parameter to the bash_completion commands.
~/Repos/bash-my-aws$ instances i-xxxxxxxx
Bad value for --query Reservations[].Instances[][InstanceId,[Tags[?Key==Name
].Value][0][0]] i-13d381cd: Unexpected token: i: Parse error at column 72, token "i" (UNQUOTED_IDENTIFIER), for expression:
"Reservations[].Instances[][InstanceId,[Tags[?Key==Name
].Value][0][0]] i-xxxxxxxx"
We must accept resources at the end of a line.
If you use an alias, you want your switches at the start and arguments at the end.
$ alias instances="instances --query 'Reservations[].Instances[][InstanceId]'"
$ instances i-aa500674
I will die
That fails because the resource must come before the --query switch. This needs to be changed for aliases to work correctly.
The directory root is now clean and simple. Yay.
I'm still very drawn to the idea of putting the resource-functions scripts in the top level dir.
This would mean they're listed when someone hits the project page or checks out directory.
I feel like this would make them more accessible.
What do you think @jonhiggs ?
bash-my-aws(dev)$ ls
LICENSE Makefile README.md bin doc lib test
source <(./bin/generate_bash_completion) doesn't work. Update the documents to provide a different solution.
need to fix it.
We have a failing test.
As far as I know, a stack will rollback as soon as anything fails, so there can only be a single failure per deploy. cf_reason should only return the latest failure, if there are more than one, the older are no longer relevant because they must be for previous deploy attempts.
It's currently "desired, maximum, minimum". That's not a very intuitive order. minimum, desired, maximum is probably better.
I've set this to milestone 1 because it's a minor change and will be a breaking change if we fix it later.
Heya,
When pulling cloudformation events in table form, the table size changes with each line - which makes uniq fail to recognise that the lines are the same, and causes duplicate lines to be displayed. I've adjusted my own scripts to output in text form rather than table - you can see my modified version at https://github.com/rewardle/cf_stack_deployer/blob/master/deploy.sh
Ta :)
make sure the tests keep passing.
show list of all my stacks
rds_arn()
$INSTANCE_OUTPUT
everythings() --tags
__bma_read_input()
output
mike want's to make sure that things are good before we release.
Seems an odd branch name. Is there something special about it?
Need to migrate doc/jons_notes.txt and doc/mikes_notes.md into issues or something else maybe.
make sure we are still in agreement and update if we need to
Are we doing soft or hard wrapping in the README.md? It's a bit muddled at the moment.
Maybe this would be better as a documentation item rather than a script. Feels a little bit personal rather than global.
I'm not sure how to read the list. Are the newest at the bottom (this is the opposite to the console)? How many updates are showed in the output and where do they start?
Automation is good. :)
It's missing usage details.
make sure that the old functions exist
the readme is out of date.
Hey Mike,
I completely missed the instance-functions
until I was about to create my own functions using aws
CLI. Maybe have some pointer about the instance-functions
file in your README.md
?
I'd like to be able to find all instances sometimes like asg-instances --pending
.
branch out jon's experiments and remove from the dev branch.
Hi Mike,
Just stumbled across a peculiar issue with cf_asg_instances
function. When I do a cf_asg_instances some_stack
on a CFN stack and all the ec2 instances in the stack is powered off, cf_asg_instances some_stack
returns every single ec2 instance in the AWS account. And when I do a cf_asg_instance_ssh some_stack
, I get ssh-ed into an ec2 instance that does not even belong to the stack at all.
Happy to provide more details if needed.
without parameters asg-instances should return usage.
bash-my-aws is a great project and save me a lot of typing and time during my daily routine job, but I think there could be more enhancements, for ex, the function to list all volumes, search volume and delete volum.
sometimes, there would be a case a lot of volumes got created and but not deleted on time, so you would see something like this:
and this:
most of volumes are at a 'available' status rather than 'in-use' status. those volumes could be safely removed.
So I want to add some functionality as below:
I will fork you project and send a pull request later. thanks a lot.
local stack=$(__bma_read_resources ${inputs} | awk '{print $1}')
__bma_read_resources returns multiline output so we should probably replace awk with head
We must accept resources at the end of a line.
If you use an alias, you want your switches at the start and arguments at the end.
$ alias instances="instances --query 'Reservations[].Instances[][InstanceId]'"
$ instances i-aa500674
I will die
That fails because the resource must come before the --query switch. This needs to be changed for aliases to work correctly.
stack-asg | asg-instances # should return nothing if there is no asg in stack
I'm happy to do this. I'll add a PR for a review.
replace all hyphens with underscores.
~/Repos/bash-my-aws$ instances i-xxxxxxxx
Bad value for --query Reservations[].Instances[][InstanceId,[Tags[?Key==Name
].Value][0][0]] i-13d381cd: Unexpected token: i: Parse error at column 72, token "i" (UNQUOTED_IDENTIFIER), for expression:
"Reservations[].Instances[][InstanceId,[Tags[?Key==Name
].Value][0][0]] i-xxxxxxxx"
If a dir full of stack templates exists, use that for fast bash-completion.
Do we want to be unixy and be silent on success? What determines whether something is successful?
I'm talking about when we create, update and delete things?
Consider moving the functions into a directory named plugins.d/
. This makes it clear to users that bash-my-aws is intended to be extended and makes it obvious how it's done.
It would be nice for a user to define the output style of various commands. It's conceivable that someone may not find the default outputs of instances useful (I for one would prefer that the output was narrower).
This will mean we may get away with not fixing #43
Let's not make a move to hyphens at this point
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.