mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 11:38:47 +00:00
Add Gitlab to available AnsibleNAS packages.
This commit is contained in:
parent
d73f5a747e
commit
ee1fde0142
7 changed files with 85 additions and 1 deletions
|
@ -44,7 +44,8 @@ Ansible config and a bunch of Docker containers.
|
||||||
* [Emby](https://emby.media/) - Media streaming and management
|
* [Emby](https://emby.media/) - Media streaming and management
|
||||||
* [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager
|
* [Firefly III](https://firefly-iii.org/) - Free and open source personal finance manager
|
||||||
* [get_iplayer](https://github.com/get-iplayer/get_iplayer) - download programmes from BBC iplayer
|
* [get_iplayer](https://github.com/get-iplayer/get_iplayer) - download programmes from BBC iplayer
|
||||||
* [Gitea](https://gitea.io/en-us/) - Self-hosted Github clone
|
* [Gitea](https://gitea.io/en-us/) - Simple self-hosted Github clone
|
||||||
|
* [Gitlab](https://about.gitlab.com/features/) - Self-hosted Github clone of the highest order
|
||||||
* [Glances](https://nicolargo.github.io/glances/) - for seeing the state of your system via a web browser
|
* [Glances](https://nicolargo.github.io/glances/) - for seeing the state of your system via a web browser
|
||||||
* [Grafana](https://github.com/grafana/grafana) - Dashboarding tool
|
* [Grafana](https://github.com/grafana/grafana) - Dashboarding tool
|
||||||
* [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH
|
* [Guacamole](https://guacamole.apache.org/) - Web based remote desktop gateway, supports VNC, RDP and SSH
|
||||||
|
|
14
docs/applications/gitlab.md
Normal file
14
docs/applications/gitlab.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# GitLab
|
||||||
|
|
||||||
|
Homepage: [https://docs.gitlab.com/omnibus/docker/](https://docs.gitlab.com/omnibus/docker/)
|
||||||
|
|
||||||
|
If Gitea isn't powerful enough for you then consider GitLab. It's a much more powerful (and consquently bigger) Git repository solution that includes a suite of code analytics. On the other hand it requires more RAM.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Set `gitlab_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
|
||||||
|
|
||||||
|
To make GitLab available externally via Traefik set `gitlab_available_externally: "true"` in your `inventories/<your_inventory>/nas.yml` file.
|
||||||
|
|
||||||
|
The first time you run GitLab you'll be prompted for an account's password. The password is for GitLab's `root` administrator account. From there you can log in to create additional users and further configure the application.
|
||||||
|
|
|
@ -18,6 +18,9 @@ By default, applications can be found on the ports listed below.
|
||||||
| get_iplayer | 8182 | |
|
| get_iplayer | 8182 | |
|
||||||
| Gitea | 3001 | Web |
|
| Gitea | 3001 | Web |
|
||||||
| Gitea | 222 | SSH |
|
| Gitea | 222 | SSH |
|
||||||
|
| Gitlab | 4080 | HTTP |
|
||||||
|
| Gitlab | 4443 | HTTPS |
|
||||||
|
| Gitlab | 422 | SSH |
|
||||||
| Glances | 61208 | SSH |
|
| Glances | 61208 | SSH |
|
||||||
| Grafana | 3000 | |
|
| Grafana | 3000 | |
|
||||||
| Guacamole | 8090 | |
|
| Guacamole | 8090 | |
|
||||||
|
|
|
@ -65,6 +65,7 @@ timemachine_enabled: false
|
||||||
|
|
||||||
# Software build and CI
|
# Software build and CI
|
||||||
gitea_enabled: false
|
gitea_enabled: false
|
||||||
|
gitlab_enabled: false
|
||||||
|
|
||||||
# IRC
|
# IRC
|
||||||
znc_enabled: false
|
znc_enabled: false
|
||||||
|
@ -568,6 +569,15 @@ gitea_data_directory: "{{ docker_home }}/gitea"
|
||||||
gitea_port_http: "3001"
|
gitea_port_http: "3001"
|
||||||
gitea_port_ssh: "222"
|
gitea_port_ssh: "222"
|
||||||
|
|
||||||
|
###
|
||||||
|
### Gitlab
|
||||||
|
###
|
||||||
|
gitlab_available_externally: "false"
|
||||||
|
gitlab_data_directory: "{{ docker_home }}/gitlab"
|
||||||
|
gitlab_port_http: "4080"
|
||||||
|
gitlab_port_https: "4443"
|
||||||
|
gitlab_port_ssh: "422"
|
||||||
|
|
||||||
###
|
###
|
||||||
### Glances
|
### Glances
|
||||||
###
|
###
|
||||||
|
|
4
nas.yml
4
nas.yml
|
@ -120,6 +120,10 @@
|
||||||
when: (gitea_enabled | default(False))
|
when: (gitea_enabled | default(False))
|
||||||
tags: gitea
|
tags: gitea
|
||||||
|
|
||||||
|
- import_tasks: tasks/gitlab.yml
|
||||||
|
when: (gitlab_enabled | default(False))
|
||||||
|
tags: gitlab
|
||||||
|
|
||||||
- import_tasks: tasks/timemachine.yml
|
- import_tasks: tasks/timemachine.yml
|
||||||
when: (timemachine_enabled | default(False))
|
when: (timemachine_enabled | default(False))
|
||||||
tags: timemachine
|
tags: timemachine
|
||||||
|
|
51
tasks/gitlab.yml
Normal file
51
tasks/gitlab.yml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
---
|
||||||
|
# The gitlab uid/gid matches 'git:git' in the Gitlab Docker image.
|
||||||
|
- name: Create Gitlab group account
|
||||||
|
group:
|
||||||
|
name: gitlab
|
||||||
|
gid: 998
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Create Gitlab user account
|
||||||
|
user:
|
||||||
|
name: gitlab
|
||||||
|
uid: 998
|
||||||
|
state: present
|
||||||
|
system: yes
|
||||||
|
update_password: on_create
|
||||||
|
create_home: no
|
||||||
|
group: gitlab
|
||||||
|
|
||||||
|
- name: Create Gitlab Directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: gitlab
|
||||||
|
group: gitlab
|
||||||
|
with_items:
|
||||||
|
- "{{ gitlab_data_directory }}/config"
|
||||||
|
- "{{ gitlab_data_directory }}/log"
|
||||||
|
- "{{ gitlab_data_directory }}/data"
|
||||||
|
|
||||||
|
- name: Create Gitlab container
|
||||||
|
docker_container:
|
||||||
|
name: gitlab
|
||||||
|
image: gitlab/gitlab-ce:latest
|
||||||
|
pull: true
|
||||||
|
volumes:
|
||||||
|
- "{{ gitlab_data_directory }}/config:/etc/gitlab:rw"
|
||||||
|
- "{{ gitlab_data_directory }}/log:/var/log/gitlab:rw"
|
||||||
|
- "{{ gitlab_data_directory }}/data:/var/opt/gitlab:rw"
|
||||||
|
ports:
|
||||||
|
- "{{ gitlab_port_http }}:80"
|
||||||
|
- "{{ gitlab_port_https }}:443"
|
||||||
|
- "{{ gitlab_port_ssh }}:22"
|
||||||
|
hostname: "gitlab.{{ ansible_nas_domain }}"
|
||||||
|
restart_policy: always
|
||||||
|
detach: yes
|
||||||
|
memory: 4g
|
||||||
|
labels:
|
||||||
|
traefik.backend: "gitlab"
|
||||||
|
traefik.frontend.rule: "Host:gitlab.{{ ansible_nas_domain }}"
|
||||||
|
traefik.enable: "{{ gitlab_available_externally }}"
|
||||||
|
traefik.port: "80"
|
|
@ -189,6 +189,7 @@ onDemand = false # create certificate when container is created
|
||||||
"emby.{{ ansible_nas_domain }}",
|
"emby.{{ ansible_nas_domain }}",
|
||||||
"firefly.{{ ansible_nas_domain }}",
|
"firefly.{{ ansible_nas_domain }}",
|
||||||
"gitea.{{ ansible_nas_domain }}",
|
"gitea.{{ ansible_nas_domain }}",
|
||||||
|
"gitlab.{{ ansible_nas_domain }}",
|
||||||
"glances.{{ ansible_nas_domain }}",
|
"glances.{{ ansible_nas_domain }}",
|
||||||
"grafana.{{ ansible_nas_domain }}",
|
"grafana.{{ ansible_nas_domain }}",
|
||||||
"guacamole.{{ ansible_nas_domain }}",
|
"guacamole.{{ ansible_nas_domain }}",
|
||||||
|
|
Loading…
Reference in a new issue