Compare commits
2 Commits
79e1cdd5bc
...
readme
Author | SHA1 | Date | |
---|---|---|---|
e8b1c433e9 | |||
c67a39982e
|
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,13 +1,3 @@
|
||||
.vagrant
|
||||
.playbook
|
||||
/*.yml
|
||||
/*.yaml
|
||||
!backup.yml
|
||||
!moxie.yml
|
||||
!docker.yml
|
||||
!dockerbox.yml
|
||||
!hypervisor.yml
|
||||
!minecraft.yml
|
||||
!proxy.yml
|
||||
!unifi.yml
|
||||
/environments/
|
||||
|
35
README.md
35
README.md
@@ -1,25 +1,39 @@
|
||||
# Project Moxie
|
||||
# Homelab
|
||||
This repository contains Ansible to automate Debian GNU/Linux servers, deploying
|
||||
server technologies that are either useful in a personal capacity or provide
|
||||
educational value on automating enterprise infrastructure.
|
||||
|
||||
Project Moxie is a personal IT homelab project written in Ansible and executed by Jenkins. It is a growing collection of infrastructure as code (IaC) I write out of curiosity and for reference purposes, keeping a handful of beneficial projects managed and secured.
|
||||
Development is accomplished using Vagrant to allow easy reproducibility in an
|
||||
isolated virtual environment that be ran on your local machine.
|
||||
|
||||
## Quick Start
|
||||
|
||||
To configure a local virtual machine for testing, follow these simple steps.
|
||||
These steps assume a basic understanding of GNU/Linux, Hypervisors, Vagrant, and Ansible.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Vagrant and VirtualBox are used to develop Project Moxie. You will need to install these before continuing.
|
||||
- [Vagrant](https://developer.hashicorp.com/vagrant/docs/installation)
|
||||
- [Supported hypervisor](https://developer.hashicorp.com/vagrant/docs/providers)
|
||||
- Ansible
|
||||
|
||||
### Installation
|
||||
|
||||
1. Clone this repository
|
||||
```
|
||||
git clone https://github.com/krislamo/moxie
|
||||
git clone https://git.krislamo.org/kris/homelab
|
||||
```
|
||||
OR download from the mirror on GitHub:
|
||||
```
|
||||
git clone https://github.com/krislamo/homelab
|
||||
```
|
||||
2. Set the `PLAYBOOK` environmental variable to a development playbook name in the `dev/` directory
|
||||
|
||||
The following `PLAYBOOK` names are available: `dockerbox`, `hypervisor`, `minecraft`, `bitwarden`, `nextcloud`, `nginx`
|
||||
2. Find available playbooks for development
|
||||
```
|
||||
cd homelab
|
||||
```
|
||||
```
|
||||
find dev -maxdepth 1 -name "*.yml" -exec basename {} .yml \;
|
||||
```
|
||||
|
||||
3. Set the `PLAYBOOK` environmental variable to a value listed in the last step, e.g.,
|
||||
```
|
||||
export PLAYBOOK=dockerbox
|
||||
```
|
||||
@@ -29,11 +43,10 @@ Vagrant and VirtualBox are used to develop Project Moxie. You will need to insta
|
||||
```
|
||||
|
||||
#### Copyright and License
|
||||
Copyright (C) 2020-2021 Kris Lamoureux
|
||||
Copyright (C) 2020-2022 Kris Lamoureux
|
||||
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
@@ -10,4 +10,3 @@
|
||||
- docker
|
||||
- gitea
|
||||
- bitwarden
|
||||
- kutt
|
||||
|
3
roles/.gitignore
vendored
3
roles/.gitignore
vendored
@@ -1,14 +1,11 @@
|
||||
# Sort roles: tail -n +6 roles/.gitignore | sort
|
||||
/*
|
||||
!.gitignore
|
||||
!requirements.yml
|
||||
# roles
|
||||
!base*/
|
||||
!bitwarden*/
|
||||
!docker*/
|
||||
!gitea*/
|
||||
!jenkins*/
|
||||
!kutt*/
|
||||
!libvirt*/
|
||||
!mariadb*/
|
||||
!minecraft*/
|
||||
|
@@ -1,16 +0,0 @@
|
||||
- name: Create Kutt directory
|
||||
file:
|
||||
path: "{{ kutt_root }}"
|
||||
state: directory
|
||||
|
||||
- name: Install Kutt's docker-compose file
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
dest: "{{ kutt_root }}/docker-compose.yml"
|
||||
notify: restart_kutt
|
||||
|
||||
- name: Install Kutt's docker-compose variables
|
||||
template:
|
||||
src: compose-env.j2
|
||||
dest: "{{ kutt_root }}/.env"
|
||||
notify: restart_kutt
|
@@ -1,36 +0,0 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
kutt:
|
||||
image: kutt/kutt:${kutt_version:-latest}
|
||||
container_name: ${kutt_name:-kutt}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
|
||||
ports:
|
||||
- ${kutt_web:-3000}:3000
|
||||
environment:
|
||||
DB_HOST: ${kutt_dbhost:-postgres}
|
||||
DB_NAME: ${kutt_dbname:-kutt}
|
||||
DB_USER: ${kutt_dbuser:-kutt}
|
||||
DB_PASSWORD: ${kutt_dbpass}
|
||||
REDIS_HOST: ${kutt_redis:-redis}
|
||||
|
||||
redis:
|
||||
image: redis:${redis_version:-6.0-alpine}
|
||||
volumes:
|
||||
- {{ redis_volume }}:/data
|
||||
|
||||
postgres:
|
||||
image: postgres:${postgres_version:-12-alpine}
|
||||
environment:
|
||||
POSTGRES_USER: ${kutt_dbuser:-kutt}
|
||||
POSTGRES_PASSWORD: ${kutt_dbpass}
|
||||
POSTGRES_DB: ${kutt_dbhost:-postgres}
|
||||
volumes:
|
||||
- {{ postgres_volume }}:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
{{ redis_volume }}:
|
||||
{{ postgres_volume }}:
|
@@ -46,6 +46,12 @@ server {
|
||||
proxy_pass {{ item.proxy_pass }};
|
||||
{% if item.proxy_ssl_verify is defined and item.proxy_ssl_verify is false %}
|
||||
proxy_ssl_verify off;
|
||||
{% endif %}
|
||||
{% if item.websockets is defined and item.websockets %}
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Origin http://$host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user