Skip to content

Commit

Permalink
Add post setup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kencx committed Apr 3, 2024
1 parent 45a7c54 commit ac004af
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/src/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ $ ansible-inventory --graph --vars
$ ansible-playbook main.yml
```

The playbook will perform the following idempotently:
The playbook will perform the following:

1. Create a root and intermediate CA for Vault
2. Configure Vault to use new CA
Expand All @@ -196,3 +196,31 @@ existing state in the `terraform/vault` subdirectory if a different
`vault_terraform_workspace` is not provided. This WILL result in permanent data
loss and care should be taken when running the role (and playbook) on multiple
clusters or servers.

## Post Setup

### Smoke Tests

Smoke tests are performed with [goss](https://github.com/goss-org/goss) as part
of the `main.yml` playbook to ensure all required software are installed and
running.

>**Note**: The included goss files are static with hardcoded information. As
>such, they will fail if some of the Ansible default variables are changed (eg.
>username, NFS mountpoints). See
>[issues](./references/issues.md#static-goss-files) for details on a workaround.
### Running Applications

After verifying that the cluster is up and running, we can begin to run
applications on it with Nomad jobs. This project provides a number of Nomad
jobspec files in `terraform/nomad/apps` to be run with Terraform with the
following features:

- With Vault integration configured, Nomad supports the fetching of application
secrets with Vault
- Traefik as a reverse proxy
- (Optional) Postgres as a database (with Vault-managed DB credentials)

See [Adding a New Application](./apps/add_new.md) for details on onboarding a
new application to Nomad.
17 changes: 17 additions & 0 deletions docs/src/references/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,20 @@ is [not supported](https://github.com/hashicorp/vault/issues/20538).~
[#18562](https://github.com/hashicorp/vault/issues/18562). A
[fix](https://github.com/hashicorp/vault/pull/19002) is available in Vault
1.14.~

## Static Goss Files

The provided goss files in `ansible/goss` contain hardcoded information that can
cause the smoke tests to fail if some Ansible variables are modified:

- common_user
- common_nfs_dir
- common_packages

The temporary workaround is to create your own goss files, edit the given goss
files or to simply comment out the smoke test tasks.

To fix this, goss
[supports](https://github.com/goss-org/goss/blob/master/docs/gossfile.md#templates)
templating to create dynamic goss files. The `ansible_collection.goss` role must
be modified to add support for dynamic tests.

0 comments on commit ac004af

Please sign in to comment.