simple_deploy icon indicating copy to clipboard operation
simple_deploy copied to clipboard

Add a command to show versions

Open ghost opened this issue 12 years ago • 5 comments

Based on the manual debugging we have done for Jimmy the past two days, Jimmy and I think it would be good to have a simple_deploy command that lists installed versions on the instances. The app version would be the most desired, but we might want to do cookbooks and chef too for our own purposes.

My thought is a command that takes a stack name and returns the version on each stack instance.

Any thoughts?

ghost avatar Nov 06 '12 17:11 ghost

Rick,

I was thinking about a possible solution for this kind of use case. Rather than add a specific sub command for this, I was thinking we could add a way that people could setup arbitrary commands which will be stored in simpledb and could be executed on stacks.

For example

simple_deploy command -e ENV -n STACK -c 'uname -a' -s uname

then an engineer could run

simple_deploy execute -s uname

And it would be executed across all instances via the execute method.

This gives engineers the ability to define any commands (like the one you guys are discussing for showing the version).

Let me know your thoughts

weavenet avatar Nov 06 '12 17:11 weavenet

Brett,

I have to learn to think about what the execute command can do first. Sounds like a good idea.

Would we allow them to declare the command on the fly? So in this case, if we didn't have a command named 'uname' we would auto-save it?

To help engineers, I guess we would also need a -l list option to list known commands? simple_deploy command -e ENV -n STACK -l

I understand -c is for the command. What is -s, stored name?

ghost avatar Nov 06 '12 18:11 ghost

Yeah, that is what I was thinking, but we can play with the variables.

Still have not fully thought it out, but my initial thought is I envision it being stored in simple db with each stack. We could use a convention like command_NAME = value (for example command_uname = 'uname -a').

Like the idea of list commands. Additionally we could have canned commands that are specified for each stack (enable_turnwaway, disable_turnaway, app_version, chef_version, etc)

weavenet avatar Nov 06 '12 18:11 weavenet

Seems like we could create the canned commands when we create the stack.

I am trying to envision how engineers would use them.

simple_deploy execute -e ENV -n STACK --named app_version

So we would have two ways to use execute for commands. Pass the -c and -s options to create a command on the fly. Pass the --named to run a pre-existing command. I only used --named because -n is taken and I can't think of another letter that makes sense here.

ghost avatar Nov 06 '12 18:11 ghost

That is what I'm thinking. Tommy & I were throwing around the idea of specifiying commands for all stacks, but I'm not sure what that would look like. We can talk about it tomorrow.

weavenet avatar Nov 06 '12 18:11 weavenet