forked from hashicorp/vault-guides
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
F add provision guides (hashicorp#40)
* Rename * Update Vault best-practices guides * Fix output warnings * Fix TLS * Use curl bash to run dev scripts * Move provision guides under operations and cleanup repo * Remove shared directory and use curl bash instead * Use cleanup script * Update outputs and PATH * Rename files * Update module source * Use HTTPS instead of SSH for module sources * Add READMEs and rename folders * Update module outputs * Update module sources * Update vars * f-refactor to master * Update versions * Update underscores with hyphens * Cleanup repo
- Loading branch information
Showing
176 changed files
with
2,705 additions
and
1,374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Guides related to governance within Vault stored here. Sentinel guides only available for Vault Enterprise Premium. | ||
Guides related to governance within Vault stored here. Sentinel guides only available for Vault Enterprise Premium. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
identity/ssh_ca/vagrant/README.md → identity/ssh-ca/vagrant-local/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Vault variable defaults | ||
vault_version = ENV['VAULT_VERSION'] || "0.10.0" | ||
vault_ent_url = ENV['VAULT_ENT_URL'] | ||
vault_group = "vault" | ||
vault_user = "vault" | ||
vault_comment = "Vault" | ||
vault_home = "/srv/vault" | ||
|
||
$vault_env = <<VAULT_ENV | ||
sudo cat << EOF > /etc/profile.d/vault.sh | ||
export VAULT_ADDR="http://192.168.50.100:8200" | ||
export VAULT_SKIP_VERIFY=true | ||
EOF | ||
VAULT_ENV | ||
|
||
$vault_run = <<VAULT_RUN | ||
nohup /usr/local/bin/vault server -dev \ | ||
-dev-root-token-id="password" \ | ||
-dev-listen-address="0.0.0.0:8200" 0<&- &>/dev/null & | ||
VAULT_RUN | ||
|
||
$hosts_file = <<HOSTS_FILE | ||
sudo cat << EOF >> /etc/hosts | ||
192.168.50.100 vault vault.example.com | ||
192.168.50.101 client client.example.com | ||
EOF | ||
HOSTS_FILE | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", "512"] | ||
vb.customize ["modifyvm", :id, "--cpus", "1"] | ||
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"] | ||
vb.customize ["modifyvm", :id, "--chipset", "ich9"] | ||
vb.customize ["modifyvm", :id, "--ioapic", "on"] | ||
end | ||
config.vm.define "vault" do |vault| | ||
vault.vm.network :private_network, ip: "192.168.50.100" | ||
vault.vm.box = "bento/centos-7.3" | ||
vault.vm.box_version = "2.3.8" | ||
vault.vm.hostname = "vault" | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/shared/scripts/base.sh | bash" | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/shared/scripts/setup-user.sh | bash", | ||
env: { | ||
"GROUP" => vault_group, | ||
"USER" => vault_user, | ||
"COMMENT" => vault_comment, | ||
"HOME" => vault_home, | ||
} | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/vault/scripts/install-vault.sh | bash", | ||
env: { | ||
"VERSION" => vault_version, | ||
"URL" => vault_ent_url, | ||
"USER" => vault_user, | ||
"GROUP" => vault_group, | ||
} | ||
vault.vm.provision "shell", inline: $vault_env | ||
vault.vm.provision "shell", inline: $vault_run | ||
vault.vm.provision "shell", inline: $hosts_file | ||
end | ||
|
||
config.vm.define "client" do |client| | ||
client.vm.network :private_network, ip: "192.168.50.101" | ||
client.vm.box = "bento/centos-7.3" | ||
client.vm.box_version = "2.3.8" | ||
client.vm.hostname = "client" | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/shared/scripts/base.sh | bash" | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/shared/scripts/setup-user.sh | bash", | ||
env: { | ||
"GROUP" => vault_group, | ||
"USER" => vault_user, | ||
"COMMENT" => vault_comment, | ||
"HOME" => vault_home, | ||
} | ||
vault.vm.provision "shell", inline: "curl https://raw.githubusercontent.com/hashicorp/guides-configuration/master/vault/scripts/install-vault.sh | bash", | ||
env: { | ||
"VERSION" => vault_version, | ||
"URL" => vault_ent_url, | ||
"USER" => vault_user, | ||
"GROUP" => vault_group, | ||
} | ||
client.vm.provision "shell", inline: $vault_env | ||
client.vm.provision "shell", inline: $hosts_file | ||
end | ||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Provision Vault | ||
|
||
The goal of this guide is to allows users to easily provision a Vault cluster in just a few short commands. | ||
|
||
## Reference Material | ||
|
||
- [Terraform](https://www.terraform.io/) | ||
- [Consul](https://www.consul.io/) | ||
- [Vault](https://www.vaultproject.io/) | ||
|
||
## Estimated Time to Complete | ||
|
||
5 minutes. | ||
|
||
## Personas | ||
|
||
### Operator | ||
|
||
The operator is responsible for producing the Vault cluster infrastructure and managing day 1 & 2 operations. This includes initial service administration, upgrades, logging/monitoring, and more. | ||
|
||
### Developer | ||
|
||
The developer will be consuming the Vault services and developing against it. This may be leveraging Vault for Secrets Management, Identity, and Encryption as a Service. | ||
|
||
### InfoSec | ||
|
||
Infosec will be creating and managing ACLs for Vault, this may include both ACLs and Sentinel policies. | ||
|
||
## Challenge | ||
|
||
There are many different ways to provision and configure a Vault cluster, making it difficult to get started. | ||
|
||
## Solution | ||
|
||
Provision a Vault cluster. This will enable users to easily provision a Vault cluster for their desired use case. | ||
|
||
### Dev | ||
|
||
The [Vault Dev Guides](./dev) are for **educational purposes only**. They're designed to allow you to quickly standup a single instance with Vault running in `-dev` mode in your desired provider. The single node is provisioned into a single public subnet that's completely open, allowing for easy (and insecure) access to the instance. Because Vault is running in `-dev` mode, all data is in-memory and not persisted to disk. If any agent fails or the node restarts, all data will be lost. This is in no way, shape, or form meant for Production use, please use with caution. | ||
|
||
### Quick Start | ||
|
||
The [Vault Quick Start Guide](./quick-start) provisions a 3 node Vault cluster and 3 node Consul cluster with all agents running in server mode in the provider of your choice. | ||
|
||
The Quick Start guide leverages the scripts in the [Guides Configuration Repo](https://github.com/hashicorp/guides-configuration) to do runtime configuration of Vault. Although using `curl bash` at runtime is _not_ best practices, this makes it quick and easy to standup a Vault cluster with no external dependencies like pre-built images. This guide will also forgo setting up TLS/encryption on Vault for the sake of simplicity. | ||
|
||
### Best Practices | ||
|
||
The [Vault Best Practices Guide](./best-practices) provisions a 3 node Vault cluster with a similar architecture to the [Quick Start](#quick-start) guide in the provider of your choice. The difference is this guide will setup TLS/encryption across Vault and depends on pre-built images rather than runtime configuration. You can find the Packer templates to create these Vault images in the [Guides Configuration Repo](https://github.com/hashicorp/guides-configuration/tree/master/vault). | ||
|
||
## Steps | ||
|
||
We will now provision the Vault cluster. | ||
|
||
### Step 1: Choose your Preferred Guide | ||
|
||
`cd` into one of the below guides from the root of the repository and follow the instructions from there. | ||
|
||
- [Vagrant dev](./dev/vagrant-local) | ||
- [AWS dev](./dev/terraform-aws) | ||
- [AWS quick-start](./quick-start/terraform-aws) | ||
- [AWS best-practices](./best-practices/terraform-aws) | ||
|
||
#### CLI | ||
|
||
```sh | ||
$ cd operations/provision-vault/dev/vagrant-local | ||
$ cd operations/provision-vault/dev/terraform-aws | ||
$ cd operations/provision-vault/quick-start/terraform-aws | ||
$ cd operations/provision-vault/best-practices/terraform-aws | ||
``` | ||
|
||
## Next Steps | ||
|
||
Now that you've provisioned and configured Vault, start walking through the [Vault Guides](https://www.vaultproject.io/guides/index.html). |
Oops, something went wrong.