GithubHelp home page GithubHelp logo

gcp-csi-nomad's Introduction

Provision a Nomad cluster in the cloud

Use this repo to provision a Nomad sandbox environment on GCP with Packer and Terraform. Consul and Vault are also installed (colocated for convenience).

Google Persistent Disk

This repo is setup to use GCP to test Nomad's CSI features. This repo provisions the necessary plugins and volume specs to enable the alpine.nomad job to leverage persistent disks as volumes.

Setup

Clone the repo and optionally use Vagrant to bootstrap a local staging environment:

$ git clone https://github.com/louievandyke/gcp-csi-nomad.git

The Vagrant staging environment pre-installs Packer, Terraform, and Docker.

Provision a cluster

  • Follow the steps here to provision a cluster on GCP using Google Persistent disks as CSI volumes.

Continue with the steps below after a cluster has been provisioned.

Test

Run a few basic status commands to verify that Consul and Nomad are up and running properly:

$ consul members
$ nomad server members
$ nomad node status

Unseal the Vault cluster (optional)

To initialize and unseal Vault, run:

$ vault operator init -key-shares=1 -key-threshold=1
$ vault operator unseal
$ export VAULT_TOKEN=[INITIAL_ROOT_TOKEN]

The vault init command above creates a single Vault unseal key for convenience. For a production environment, it is recommended that you create at least five unseal key shares and securely distribute them to independent operators. The vault init command defaults to five key shares and a key threshold of three. If you provisioned more than one server, the others will become standby nodes but should still be unsealed. You can query the active and standby nodes independently:

$ dig active.vault.service.consul
$ dig active.vault.service.consul SRV
$ dig standby.vault.service.consul

See the Getting Started guide for an introduction to Vault.

gcp-csi-nomad's People

Contributors

louievandyke avatar

Watchers

 avatar

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.