Giter VIP home page Giter VIP logo

ndejong / terraform-digitalocean-cjdns-node Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 17 KB

Terraform module to create a Cjdns node in Digital Ocean and push your locally managed cjdroute.conf files

Home Page: https://registry.terraform.io/modules/ndejong/cjdns-node/digitalocean

License: Apache License 2.0

Shell 32.59% HCL 67.41%
terraform terraform-modules digitalocean cjdns mesh-networks hyperboria

terraform-digitalocean-cjdns-node's Introduction

Terraform + Digital Ocean + cjdns

Terraform module to create a cjdns node and push a locally managed cjdroute.conf files once the digitalocean-droplet comes online.

Usage

Establishing up a cjdns node (running v20) on Digital Ocean can be made incredibly easy with this Terraform module as shown in the minimal example below:-

module "cjdns-node" {
  source = "verbnetworks/cjdns-node/digitalocean"
  hostname = "node0-sfo2-digitalocean"
  region = "sfo2"
  user = "<username>"
  user_sshkey = "<ssh-public-key>"
  cjdroute_config = "${path.cwd}/../../data/cjdroute/node0-sfo2-digitalocean.json"
}

You can very easily start a cjdns-crashy release by specifying the git-commit as shown:-

module "cjdns-node" {
  source = "verbnetworks/cjdns-node/digitalocean"
  hostname = "node0-sfo2-digitalocean"
  region = "sfo2"
  user = "<username>"
  user_sshkey = "<ssh-public-key>"
  cjdns_commit = "ec3c3126943d7a95d2b1c2fe95f047883e64214b"  # crashy @ 2018-02-03
  cjdroute_config = "${path.cwd}/../../data/cjdroute/node0-sfo2-digitalocean.json"
}

NB: the required build cycles can take ~10 minutes to complete, do a tail -f /var/log/cloud-init-output.log to watch the progress - you will recognise when everything is complete by the ascii-art hostname when ssh'ing into the host.

The module provides a range of other input-variables and useful outputs to tweak your digitalocean-droplet as required.

Input Variables - Required

hostname

The hostname applied to this cjdns-node droplet.

region

The digitalocean region to start this cjdns-node within.

user

The user initial login user to create with passwordless sudo access for this cjdns-node, if empty no account will be created. The root account is always disabled.

user_sshkey

The sshkey to apply to the initial user account - password based auth is always disabled.

cjdroute_config

The local cjdroute.conf file to push to this cjdns-node droplet.

Input Variables - Required with defaults already set

cjdns_commit

The git-commit sha1 to download from github.com/cjdelisle/cjdns then build and install on this cjdns-node. The default is currently ec3c3126943d7a95d2b1c2fe95f047883e64214b which represents v20, if you wish to use a more recent crashy commit you can specify it here.

  • Default: "efd7d7f82be405fe47f6806b6cc9c0043885bc2e"

Recent (as at 2018-02) commits and versions are listed here for reference:- https://github.com/cjdelisle/cjdns/releases

  • crashy = ec3c3126943d7a95d2b1c2fe95f047883e64214b @ 2018-02-03
  • crashy = 0a08d0812976548ce12db9d80a9c0033fb8a14fc @ 2018-01-10
  • v20 = efd7d7f82be405fe47f6806b6cc9c0043885bc2e
  • v19.1 = f4f73cdc120907f9952f7c74abe68394fd2879a0
  • v19 = 63fdd890d7b9903e386ae094fe4ace548d3988f6
  • v18 = 6781eddb2b206da6d9e14fa79fab507c9f154acf

image

The digitalocean image to use as the base for this cjdns-node.

  • Default: "ubuntu-16-04-x64"

size

The digitalocean droplet size to use for this cjdns-node.

  • Default: "512mb"

backups

Enable/disable droplet backup functionality on this cjdns-node.

  • Default: false

monitoring

Enable/disable droplet monitoring functionality on this cjdns-node.

  • Default: true

ipv6

Enable/disable getting a public IPv6 on this digitalocean-droplet.

  • Default: true

private_networking

Enable/disable digitalocean private-networking functionality on this cjdns-node.

  • Default: true

Input Variables - Optional

ipfs_version

If set will additionally install IPFS on this cjdns-node, without any config! This is provided as a convenience only since IPFS is generally a useful use-case for cjdns-nodes to participate in. IPFS versions can be found https://dist.ipfs.io/go-ipfs/versions

  • Default: ""

Outputs

hostname

The hostname given to this cjdns-node.

region

The digitalocean region this cjdns-node is within

user

The user initial login user created with passwordless sudo access on this cjdns-node if set.

cjdroute_config

The local cjdroute.conf file pused to this cjdns-node droplet.

cjdns_commit

The cjdns git commit used to download, build and install on this cjdns-node.

ipfs_version

The IPFS version used to download and install on this cjdns-node.

ipv4_address

The public digitalocean-droplet IPv4 address of this cjdns-node.

ipv6_address

The public digitalocean-droplet IPv6 address of this cjdns-node.

Authors

Module managed by Verb Networks

License

Apache 2 Licensed. See LICENSE for full details.

terraform-digitalocean-cjdns-node's People

Contributors

ndejong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ryanoatz99

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.