Giter Site home page Giter Site logo

coreos_on_ec2's Introduction

A set of bash scripts to ease launching a coreos cluster on ec2

Prerequisites

These scripts use the AWS command line client, so that needs to be installed and configured before you get started.

pip install awscli
aws configure #Will propmt you to enter your AWS access credentials

If you can run aws ec2 describe-regions --output text and get a list of regions back then you are good to go.

See the AWS cli docs if you run into any problems.

Installation

Clone the repository and then run the scripts from within the repo folder.

git clone https://github.com/bigblue/coreos_on_ec2.git
cd coreos_on_ec2

Walkthrough

See this accompanying blog post for a background on the commands and to see the process of launching a new cluster.

Commands

$ ./launchInstances.sh -h
launchInstances.sh [OPTION]...

Launch instances to create new coreos cluster

Options:
 -n, --number    Number of instances to launch [default: 1]
 -g, --group     Security group name for new instances [default: coreosgroup]
 -r, --region    Region to launch instance(s) in, comma seperate multiple regions
                 e.g. 'us-east-1, us-west-1' [default: us-west-1]
 -k, --key       Path to public key of keypair to use
                 [default: ~/.ssh/CoreOSKey_rsa.pub]
                 A new keypair will be generated if file does not exist
 -t, --token     Discovery token to use (will be inserted into userdata)
                 [default: New token will be autogenerated from
                  https://discovery.etcd.io/new ]
 -u, --userdata  Path to userdata file to boot instances with
                 [default: ./single_region_userdata.yml]
 -s, --skip-aws-checks Skip checking if aws cli is installed
 -w, --weave-rules  Include weave security group
 -h, --help      Display this help and exit
     --version   Output version information and exit
~
$ ./listinstances.sh -h
listInstances.sh [OPTION]...

List currently running instances in coreos cluster

Options:
  -g, --group     Filter by cluster security group [default: coreosgroup]
  -r, --region    Filter by region, comma seperate multiple regions
                  e.g. 'us-east-1, us-west-1' [default: all regions]

  -s, --skip-aws-checks    Skip checking if aws cli is installed
  -h, --help        Display this help and exit
      --version     Output version information and exit
$ ./connectToInstance.sh -h
connectToInstance.sh [OPTION]...

Quickly connect to one of the instances listed by listInstances.sh

Options:
  -i, --index     Which instance in list to connect to [default: 1]
  -k, --key       Path to private key to authenticate with [default: ~/.ssh/CoreOSKey_rsa]
  -g, --group     Security group to filter listInstances.sh with [default: coreosgroup]

  -h, --help        Display this help and exit
      --version     Output version information and exit
$ ./terminateInstances.sh -h
terminateInstances.sh [OPTION]...

Terminate currently running instances in coreos cluster

Options:
  -g, --group     Filter by cluster security group [default: coreosgroup]
  -r, --region    Filter by region, comma seperate multiple regions
                  e.g. 'us-east-1, us-west-1' [default: all regions]

  -s, --skip-aws-checks    Skip checking if aws cli is installed
  -h, --help        Display this help and exit
      --version     Output version information and exit

Acknowledgements

Used oxyc's bash boilerplate script as a starting point.

Contributing

  1. Create an issue to discuss about your idea
  2. [Fork it] (https://github.com/bigblue/coreos_on_ec2/fork)
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request
  7. Profit! โœ…

License

Released under the MIT License. See LICENSE.

coreos_on_ec2's People

Contributors

bigblue avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

benlynchnz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.