Sign inSign up

million12/linode-coreos-api

By million12

•Updated over 8 years ago

Deploy CoreOS on Linode.

Image
2

2.4K

million12/linode-coreos-api repository overview

⁠CoreOS deployment on Linode

With this work you can easily deploy CoreOS⁠ on Linode⁠. As for today (Jan 2015) CoreOS is not available on Linode. With this work you can easily and quickly deploy CoreOS with your own cloud-config.

⁠Installation (with Docker)

This is the recommended - and the simplest, if you already familiar with Docker - way to use this tool. If you have you Docker daemon running, pull the image: docker pull million12/linode-coreos-api

Then simply run:
docker run -t --env="LINODE_KEY=$LINODE_KEY" --rm million12/linode-coreos-api

To make it even easier, add an alias to your .bash_profile:

export LINODE_KEY=yourkey
alias linode='docker run -t --env="LINODE_KEY=$LINODE_KEY" --rm million12/linode-coreos-api'

With this you can run simply linode --help or linode --list-plans. The Docker image has ENTRYPOINT set to linode script, therefore any extra param will be passed directly to linode script.

⁠Installation (manual, the old way)

You will need to have few programs installed on your machine to be able to use this api. The list contains:

  • curl
  • pwgen
  • sudo
  • jq
  • sshpass
    Mac Users install:
    brew install https://raw.github.com/eugeneoden/homebrew/eca9de1/Library/Formula/sshpass.rb

You can install all above using yum install NAME (RHEL) or apt-get install NAME (Fedora, Debian, Ubuntu) or brew install NAME (OSX).

Once you have them all, run ./linode. You can also symlink linode tool to your $PATH to make it available everywhere.

⁠Environment variables

You need environmental variables with keys for Linode API access and GitHub for accessing your cloud-config file (which might be inside a private repository). Note: in the future we would like See Linode/GitHub documentation.
Linode API Key documentation⁠
GitHub API Key documentation⁠

Variables:
LINODE_KEY=yourkey

You can easily export them by running in shell:
export LINODE_KEY=yourkey

⁠Usage

When program is installed you can run it from terminal by typoing linode. For all available options type --help or -h.

Options:

CommandDetailsImportance
--cloud-configContent of the user-data config. You must provide it using this trick:
--cloud-config="$(< path/to/your/cloud-config.yaml)
Required
--node-nameName for your nodeRequired
--node-planPlan of your choice. If not provided system will show you all available options.Optional
Default: 1
(1CPU, 1GB RAM)
--datacenterDatacenter in which your node should be deployed. If not provided system will show you all available options.Optional
Default: 2
(Dallas, TX)
--tokenETCD Token Key for fleet deployment. If not provided program will generate one.Optional
--swap-disk-sizeSwap size in MB. Set to 0 to disable. Must be an integer value. That will decrease the CoreOS system partition size by provided amount.Optional
Default: 2048
--extra-disk-sizeExtra partition (raw) size in MB to create next to default system partition. Must be an integer value. That will decrease the CoreOS system partition size by provided amount.Optional
Default: 0

Linode lists:

CommandDetails
--list-plansList all available plans
--list-datacentersList all available datacenters
⁠Examples

Deploy node with cloud-config.yaml config:
linode --node-name=test1 --node-plan=1 --datacenter=3 --cloud-config="$(< path/to/cloud-config.yaml)"

⁠Author(s)

Author: Przemyslaw Ozgo ([email protected]⁠)
Note: this work uses Linode API originally developed by rwky/Linode-Bash-API⁠.


Sponsored by Typostrap.io - the new prototyping tool⁠ for building highly-interactive prototypes of your website or web app. Built on top of TYPO3 Neos CMS and Zurb Foundation framework.

Tag summary

Content type

Image

Digest

sha256:9b3c4ac8b…

Size

93.8 MB

Last updated

over 8 years ago

docker pull million12/linode-coreos-api