Skip to content

Commit 0536a1c

Browse files
authored
Merge pull request #55 from devopshobbies/transfer-ownership
Transfer ownership to DevOpsHobbies changes
2 parents 406ff0d + 26c4929 commit 0536a1c

File tree

8 files changed

+94
-19
lines changed

8 files changed

+94
-19
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b
2323
with:
2424
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
default_bump: minor
25+
default_bump: patch
2626

2727
- name: Build Changelog
2828
id: github_release

Contributing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Thank you for considering contributing to the HashiCorp Boundary and Vault Stack
2727
cd boundary-vault-stack
2828
```
2929

30-
3. **Set Up Your Environment**: Ensure you have the necessary dependencies installed as outlined in the [documentation](./artifacts/wiki.md).
30+
3. **Set Up Your Environment**: Ensure you have the necessary dependencies installed as outlined in the [documentation](https://devopshobbies.github.io/boundary-vault-stack/).
3131

32-
4. **Review the Documentation**: Familiarize yourself with the project by thoroughly reading the [documentation](./artifacts/wiki.md) and reviewing the [automation workflow diagram](https://linktw.in/PloXtt).
32+
4. **Review the Documentation**: Familiarize yourself with the project by thoroughly reading the [documentation](https://devopshobbies.github.io/boundary-vault-stack/) and reviewing the [automation workflow diagram](https://linktw.in/PloXtt).
3333

3434
## Types of Contributions
3535

@@ -39,7 +39,7 @@ If you encounter any bugs, errors, or have suggestions for improvements:
3939

4040
- **Search Existing Issues**: Before submitting a new issue, check if it has already been reported.
4141
- **Create a New Issue**: If it’s a new issue, provide detailed information such as steps to reproduce, expected vs. actual results, and any relevant screenshots or logs.
42-
- **Link to Related Tasks**: If your issue relates to any of the [TODOs](https://github.com/Shayan-Ghani/boundary-vault-stack/tree/main/#to-do), reference the corresponding task.
42+
- **Link to Related Tasks**: If your issue relates to any of the [TODOs](https://github.com/devopshobbies/boundary-vault-stack/tree/main/#to-do), reference the corresponding task.
4343

4444
### Commit Messages
4545

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,29 @@ Deploy a Self-Hosted HCP Vault and Boundary stack using end-to-end automation.
66

77
This project provides a comprehensive, hands-on experience in Infrastructure as Code (IaC) and Configuration Management. It simulates a real-world infrastructure environment with a focus on end-to-end automation, enabling DevOps engineers to collaboratively deliver a reliable, production-ready stack. Key deliverables include detailed documentation and diagrams.
88

9-
## How to Use
9+
> As of [the latest release](https://github.com/devopshobbies/boundary-vault-stack/releases/latest), BVSTACK covers **steps 0-3** of the [DevOpsHobbies Ultimate Roadmap](https://github.com/devopshobbies/devops-roadmap).
10+
11+
## 💻 Toolchain
12+
![Vault](https://img.shields.io/badge/vault-%231A1918.svg?style=for-the-badge&logo=vault)
13+
![LINUX](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
14+
![Ansible](https://img.shields.io/badge/ansible-%231A1918.svg?style=for-the-badge&logo=ansible&logoColor=white)
15+
![Terraform](https://img.shields.io/badge/terraform-%235835CC.svg?style=for-the-badge&logo=terraform&logoColor=white)
16+
![Boundary](https://img.shields.io/badge/Boundary-%231A1918.svg?style=for-the-badge&logo=hashicorp&logoColor=red)
17+
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)
18+
![Vagrant](https://img.shields.io/badge/vagrant-%231A1918.svg?style=for-the-badge&logo=vagrant&logoColor=blue)
19+
![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white)
20+
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
21+
[![Bash](https://img.shields.io/badge/Bash-1f425f.svg?style=for-the-badge&logo=image%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2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TX3wIs8ul%2Bq4HuWAAiM39vhOuR1O1fQ2gT%2F26Z8Z5vrl2OHi9OXZn995nLV9aFfS6UC9JeJPfuK0NBohWpCHMSAAsFe74WWP%2BvT25wtP9Bpob6uGqqyDnOtaeumjRu%2ByFu36VntK%2FPA5umTJeUtPWZSU9BCgud661odVp3DZtkc7AnYR33RRC708PrVi1larW7XwZIjLnd7R6SgSqWSNjU1B3F72pz5TZbXmX5vV81Yb7Lg7XT%2FUXriu8XLVqw6c6XqWnBKiiYU%2BMt3wWF7u7i91XlSEITwSAZ%2FCzAAHsJVbwXYFFEAAAAASUVORK5CYII%3D)](https://www.gnu.org/software/bash/)
22+
23+
## Pre-requisites
24+
- [Vagrant](https://developer.hashicorp.com/vagrant/downloads)
25+
- [Virtualbox](https://virtualbox.org/wiki/Linux_Downloads)
26+
- Python => 3.10.12
27+
- Pip
28+
- venv
1029

11-
1. **Read the Documentation**: Before getting started, ensure you have thoroughly reviewed the [project documentation](./artifacts/wiki.md) and the [automation workflow diagram](https://linktw.in/nWgoiO).
30+
## How to Use
31+
1. **Read the Documentation**: Before getting started, ensure you have thoroughly reviewed the [project documentation](https://devopshobbies.github.io/boundary-vault-stack/), the [automation workflow diagram](https://linktw.in/nWgoiO) and installed the **prerequisites**.
1232

1333
2. **Configure Variables**: Create your own `tfvars` file based on the samples provided in the [Boundary](./boundary/terraform/terraform.tfvars.sample) and [Vault](./vault/terraform/terraform.tfvars.sample) directories. Alternatively, you can remove the `.sample` extension from the provided sample files to use the default values.
1434

@@ -18,11 +38,15 @@ This project provides a comprehensive, hands-on experience in Infrastructure as
1838
./start.sh -e development
1939
```
2040

21-
For further assistance on exit/return codes and configurations, refer to the [documentation](./artifacts/wiki.md).
2241

23-
4. **Enter Vault Password**: You will be prompted to enter the Vault password to decrypt Ansible Vault-encrypted files (e.g., `inventory.ini`).
42+
4. **Enter Vault Password**: You will be prompted to enter the Vault password four times to decrypt Ansible Vault-encrypted files (e.g., `inventory.ini`) unless the related [issue](https://github.com/devopshobbies/boundary-vault-stack/issues/24) is resolved.
43+
44+
>**Note**: The default `ansible-vault-pass` is `BVSTACK`. This is provided for simplicity in the sample; ensure you use a strong password for your Ansible Vault-encrypted files.
45+
46+
> **Note**
47+
> The stack assumes that your host machine acts as the Ansible/Terraform controller. If you have the resources, it's recommended to spin up a separate VM to serve as the controller by cloning and running the project on that VM. after that you can export STACK_SERVER environment variable and set it to false this enables you to keep your host machine clean and isolated. Otherwise, don't even bother you won't be losing much. [learn more about STACK_SERVER](https://devopshobbies.github.io/boundary-vault-stack/#environment-variables)
2448
25-
**Note**: The default `ansible-vault-pass` is `BVSTACK`. This is provided for simplicity in the sample; ensure you use a strong password for your Ansible Vault-encrypted files.
49+
For further assistance on exit/return codes and configurations, refer to the [documentation](https://devopshobbies.github.io/boundary-vault-stack/).
2650
2751
## To-Do List
2852

artifacts/diagrams/vault.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
users = Users("\nUsers")
2020

2121
# Vault connections
22-
vault_listener - Edge(label="0.0.0.0:8200\nTLS Disabled") >> [storage_raft, vault_ui]
22+
vault_listener - Edge(label="0.0.0.0:8200\nTLS Disabled") >> vault_ui
2323
vault_listener >> Edge(label="Max Entry Size\n1MB") >> storage_raft
2424

2525
# User Management connections
26-
users >> Edge(label="Lockout Threshold: 3\nLockout Duration: 10m") >> userpass_lockout
26+
users - Edge(label="Lockout Threshold: 3\nLockout Duration: 10m") - userpass_lockout
2727

2828
# External connections
2929
api_addr = Vault("API Address\nhttp://localhost:8200")

artifacts/wiki.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,4 @@ scripts/init.sh vault
176176

177177
## Still Having Issues?
178178

179-
For further assistance, feel free to open up a new issue on the [GitHub Issues page](https://github.com/Shayan-Ghani/boundary-vault-stack/issues).
179+
For further assistance, feel free to open up a new issue on the [GitHub Issues page](https://github.com/devopshobbies/boundary-vault-stack/issues).

artifacts/wiki/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ <h4>SSH_INJECTION (optional)</h4>
136136
</ul>
137137
<p class="default">default : false</p>
138138

139+
<h4>STACK_SERVER (optional)</h4>
140+
<p>If set to false, vagrant and virtualbox won't be used to spin up BVSTACK. Instead you must create both Controller, BVSTACK and Client machines <span class="bold">manually</span> using your prefered method; ensure to address them in the inventory file accordingly.</p>
141+
<ul class="options">
142+
<li>true</li>
143+
<li>false</li>
144+
</ul>
145+
<p class="default">default : true</p>
146+
139147
</div>
140148

141149
<div class="rc section">
@@ -286,7 +294,7 @@ <h2 id="bear-in-mind">Bear In Mind</h2>
286294
<div class="issues section">
287295
<h2 id="still-having-issues" class="section-header">Still Having Issues</h2>
288296
<p>For further assistance, feel free to open up a new issue on the <a
289-
href="https://github.com/Shayan-Ghani/boundary-vault-stack/issues">GitHub Issues page.</a></p>
297+
href="https://github.com/devopshobbies/boundary-vault-stack/issues">GitHub Issues page.</a></p>
290298
</div>
291299

292300
</div>

scripts/linter.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ function lint_docker () {
4747

4848
}
4949

50+
function lint_vagrant(){
51+
if ! command -v vagrant &> /dev/null; then
52+
echo -e "ERROR: Vagrant is not installed!" >&2
53+
echo -e "Please install Vagrant from https://developer.hashicorp.com/vagrant/downloads" >&2
54+
return 1
55+
fi
56+
57+
if ! command -v VBoxManage &> /dev/null; then
58+
echo -e "ERROR: VirtualBox is not installed \nVagrant uses Virtualbox to provision vms." >&2
59+
echo -e "Please install VirtualBox from https://virtualbox.org/wiki/Linux_Downloads" >&2
60+
return 1
61+
fi
62+
return 0
63+
}
64+
65+
function lint_py(){
66+
if ! command -v python3 && ! command -v python ; then
67+
echo "Error: Python Is Not Installed." >&2
68+
return 1
69+
fi
70+
return 0
71+
}
72+
5073
function lint_ansible () {
5174

5275
cd ../ansible || { echo "Failed to change directory to ansible"; return 1; }
@@ -62,6 +85,6 @@ function lint_ansible () {
6285
return 0
6386
}
6487

65-
if [ $1 == "ansible" ]; then
88+
if [[ $1 == "ansible" ]]; then
6689
lint_ansible
6790
fi

start.sh

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,42 @@ if [ $# -ne 2 ]; then
6464
fi
6565

6666

67-
echo "***Running Boundary Vault Stack on ${STACK_ENV} Mode.****"
67+
echo -e "***Running Boundary Vault Stack on ${STACK_ENV} Mode.****\n"
6868

6969

7070
## create ignored dirs in git for confidential data
7171
mkdir -p logs/ logs/docker logs/terraform secrets/
7272

73+
source ./scripts/linter.sh
74+
if [[ ! -d "venv/" ]]; then
75+
echo -e "\nInstalling Virtual Env and dependencies."
76+
77+
py_cmd=$(lint_py)
78+
$py_cmd -m venv venv
79+
source venv/bin/activate
80+
pip install -U pip
81+
pip install -r ./requirements.txt
82+
else
83+
source venv/bin/activate
84+
pip install -r ./requirements.txt
85+
fi
86+
7387
## install required collections
7488
ansible-galaxy collection install -r requirements.yml
7589

76-
ansible-playbook -i ansible/inventory/inventory.ini ansible/playbook.yml
90+
## provision the server
91+
if [ -z "$STACK_SERVER"]; then
92+
lint_vagrant
93+
vagrant up
94+
fi
95+
96+
ansible-playbook -i ansible/inventory/inventory.ini ansible/playbook.yml --ask-vault-pass
7797
echo "****** Applying Vault changes ******"
7898
sleep 10
79-
ansible-playbook -i ansible/inventory/inventory.ini ansible/terraform.yml
99+
ansible-playbook -i ansible/inventory/inventory.ini ansible/terraform.yml --ask-vault-pass
80100
echo "********* Applying terraform provisioning ******* "
81101
sleep 5
82-
ansible-playbook -i ansible/inventory/inventory.ini ansible/boundary.yml
102+
ansible-playbook -i ansible/inventory/inventory.ini ansible/boundary.yml --ask-vault-pass
83103

84104
echo "***** Performing Stack Cleanup *******"
85-
ansible-playbook -i ansible/inventory/inventory.ini ansible/cleanup.yml
105+
ansible-playbook -i ansible/inventory/inventory.ini ansible/cleanup.yml --ask-vault-pass

0 commit comments

Comments
 (0)