GitXplorerGitXplorer
a

scaleway-terraform-ansible

public
3 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
a3b12f30c9535f2fc7e4862b4a981e9d545d062c

Update README.md

aa0s committed 4 years ago
Unverified
a1cf0e0a43da897709a867e005cd0cfd9bd1daa2

fix README

aa0s committed 4 years ago
Unverified
efc222d67e037573bee8487284d3f01ed3558fb5

Fix terraform for START1-S

aa0s committed 6 years ago
Unverified
21801f0800bbc08babe225dd657a5d342913ae8c

Improve packer, parralel build all variants

aa0s committed 6 years ago
Unverified
9b9ecae4727a336c287794c656d88b5746eff9bc

Add OpenVPN at router (override using bastion host)

aa0s committed 6 years ago
Unverified
410c5128e3cfe7772f810cc900738a70654bb43e

Improve key exchanging

aa0s committed 6 years ago

README

The README file for this repository.

Please, use this repository for education purposes only. Some time ago Scaleway was the best (IMO) VPS provider. But now their prices are not good in comparison to other providers, e.g. Hetzner. Hetzner supports both key features you may need: project scoped private network between regions and good terraform driver. This way able you completely avoid using tinc inside your private network.

scaleway-terraform-ansible

Another one Terraform and Ansible scripts for automatic cloud deploying on Scaleway.

Features

  • One bastion host (router) with one public ip
  • Access to internet from inner node (without public ip) with tinc vpn
  • OpenVPN server at router (direct access to innner nodes without bastion host)
  • START1-XS for router, START1-S for nodes

Prerequisites

Ansible >= 2.7.0

brew install ansible terraform terraform-inventory packer jq

Variables

  • TF_VAR_scaleway_private_key_path - path to scaleway private key, ~/.ssh/scaleway for example
  • TF_VAR_scaleway_organization - scaleway organization uuid
  • TF_VAR_scaleway_token - scaleway token uuid
  • TF_VAR_scaleway_region - scaleway region, par1 for example
  • TF_VAR_scaleway_node_count - nodes count, 3 by default

Deploy cloud

# Set variable
export TF_VAR_scaleway_private_key_path=xxx
export TF_VAR_scaleway_organization=xxx
export TF_VAR_scaleway_token=xxx
export TF_VAR_scaleway_region=xxx
export TF_VAR_scaleway_node_count=5 # default: 2

# Prepare and start nodes
./bin/packer.sh     # create base image
./bin/terraform.sh  # create nodes
./bin/tinc.sh       # setup tinc network
./bin/openvpn.sh    # setup openvpn at router, key will be copied into openvpn_keys/

# Get router external ip 
./bin/ansible/router_public_ip.sh

# SSH to router
./bin/ssh_router.sh

# SSH to node0
./bin/ssh_node0.sh

# SSH to node0
./bin/ssh_node1.sh