Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 28e8484

Browse files
committed
New: Add proxmox base cloud provider and other initial stuff
1 parent 7c87130 commit 28e8484

10 files changed

Lines changed: 209 additions & 3 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/config.ini
2+
.vagrant
3+

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "base/proxmox/vagrant-virtualbox-proxmox-cluster"]
2+
path = base/proxmox/vagrant-virtualbox-proxmox-cluster
3+
url = https://github.com/kairops/vagrant-virtualbox-proxmox-cluster.git
4+
branch = master

README.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,64 @@ Build a set of pieces able to act as a Cloud Training Lab. Key points:
1010
- DevOps / GitOps (2) mindset
1111
- Multiple cloud targets
1212

13+
## Requirements
14+
15+
- [Teecke devcontrol](https://github.com/teecke/devcontrol) installed
16+
17+
If you want to use `proxmox` as the base cloud provider:
18+
19+
- [Virtualbox](https://www.virtualbox.org) installed
20+
- [Vagrant](https://www.vagrantup.com) installed
21+
22+
## Usage
23+
24+
### Start the base cloud platform
25+
26+
1. Clone this repository
27+
2. Prepare the `config.yml` file from `config.yml.dist` template
28+
29+
```shell
30+
cp config.yml.dist config.yml
31+
```
32+
33+
3. Edit the `config.yml` and set your preferred provider (default: proxmox)
34+
4. Start the platform
35+
36+
```shell
37+
devcontrol start
38+
```
39+
40+
### Prepare the platform tools
41+
42+
- Opnsense
43+
- Zerotier
44+
45+
(TBD)
46+
47+
### Prepare / Start the services in the platform
48+
49+
- Prepare Android builder
50+
- Prepare iOS Builder
51+
- Start Passbolt
52+
- Start Jenkins
53+
Start Sonar
54+
- Start Nexus
55+
56+
(TBD)
57+
1358
## Draft
1459

15-
- Cloud providers
60+
- [Cloud providers](base/base.md)
1661
- Proxmox (for dev local workstation) (3)
1762
- Kubernetes
1863
- OpenShift
1964
- Amazon Web Services
2065
- Google Cloud Platform
2166
- Microsoft Azure
22-
- Platform tools
67+
- [Platform tools](tools/tools.md)
2368
- Opnsense
2469
- Zerotier
25-
- Services
70+
- [Services](services/services.md)
2671
- Passbolt
2772
- Jenkins
2873
- Android builder

base/base.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generic Platform: Base
2+
3+
Find here the resources for the different providers, in one directory for each provider.
4+
5+
## Proxmox
6+
7+
In the `proxmox` folder. Use a submodule pointing to the Kairops [Vagrant Virtualbox Proxmox Cluster](https://github.com/kairops/vagrant-virtualbox-proxmox-cluster) Github Project
8+
9+
## Kubernetes
10+
11+
TBD
12+
13+
## OpenShift
14+
15+
TBD
16+
17+
## Amazon Web Services
18+
19+
TBD
20+
21+
## Google Cloud Platform
22+
23+
TBD
24+
25+
## Microsoft Azure
26+
27+
TBD

config.ini.dist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Base
2+
BASE=proxmox

devcontrol/actions/base-start.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/bin/bash
2+
3+
# @file base/proxmox/build.sh
4+
# @brief Base start
5+
# Uses https://github.com/kairops/vagrant-virtualbox-proxmox-cluster project
6+
7+
# init
8+
source config.ini
9+
10+
function startBaseCloud() {
11+
case $1 in
12+
proxmox)
13+
git submodule update --init base/proxmox/vagrant-virtualbox-proxmox-cluster/
14+
pushd base/proxmox/vagrant-virtualbox-proxmox-cluster/
15+
#devcontrol box-build
16+
devcontrol cluster-build
17+
;;
18+
*)
19+
echo "Unknown basre provider: '${1}'. Aborting"
20+
exit 1
21+
esac
22+
}
23+
24+
# @description Base start
25+
# Defaults to "proxmox" provider
26+
#
27+
# @example
28+
# base-start
29+
#
30+
# @arg $1 Task: "brief", "help" or "exec"
31+
#
32+
# @exitcode The exit code of the statements of the action
33+
#
34+
# @stdout "Not implemented" message if the requested task is not implemented
35+
#
36+
function base-start() {
37+
38+
# Init
39+
local briefMessage="Base start"
40+
local helpMessage="""Start the base cloud of the provider configured in the 'config.ini' file
41+
42+
The default provider is: proxmox"""
43+
44+
# Task choosing
45+
case ${1} in
46+
brief)
47+
showBriefMessage ${FUNCNAME[0]} "$briefMessage"
48+
;;
49+
help)
50+
showHelpMessage ${FUNCNAME[0]} "$helpMessage"
51+
;;
52+
exec)
53+
shift
54+
if [ "${1-}" == "" ]; then
55+
PROVIDER=${BASE}
56+
else
57+
PROVIDER=${1}
58+
fi
59+
startBaseCloud ${PROVIDER}
60+
;;
61+
*)
62+
showNotImplemtedMessage $1 ${FUNCNAME[0]}
63+
return 1
64+
esac
65+
}
66+
67+
# Main
68+
base-start "$@"

devcontrol/global/startup.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Prepare initial config
4+
if [ ! -f config.ini ]; then
5+
cp -pv config.ini.dist config.ini
6+
fi
7+
8+
# Read platform configuration
9+
source config.ini
10+
11+
# Show message
12+
13+
echo "Generic Platform (c) Teecke"
14+
echo
15+
echo "# Base provider: ${BASE}"
16+
echo " -------------"
17+
echo

services/services.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generic Platform: Tools
2+
3+
Find here the resources for the different tools, in one directory for each tool.
4+
5+
## Android builder
6+
7+
TBD
8+
9+
## iOS builder
10+
11+
TBD
12+
13+
## Passbolt
14+
15+
TBD
16+
17+
## Jenkins
18+
19+
TBD
20+
21+
## Somnar
22+
23+
TBD
24+
25+
## Nexus
26+
27+
TBD
28+

tools/tools.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Generic Platform: Tools
2+
3+
Find here the resources for the different tools, in one directory for each tool.
4+
5+
## Opnsense
6+
7+
TBD
8+
9+
## Zerotier
10+
11+
TBD

0 commit comments

Comments
 (0)