Skip to content
Snippets Groups Projects
Commit 1df6398e authored by Nick Busey's avatar Nick Busey
Browse files

Begin v2 migration

parent a3d591cd
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o homelabos .
FROM python:3.11-alpine
COPY --from=0 /go/src/gitlab.com/nickbusey/homelabos/homelabos /usr/bin/homelabos
ENV ANSIBLE_VERSION 2.13.9
ENV ANSIBLE_VERSION 2.16
ENV BUILD_PACKAGES \
bash \
......@@ -93,7 +93,7 @@ RUN set -x && \
chmod +x /usr/bin/yq
RUN ansible-galaxy collection install ansible.posix
ENV ANSIBLE_GATHERING smart
......
---
- name: Copy {{ service_item }} documentation into place.
template:
src: roles/{{ service_item }}/docs.md
dest: "{{ volumes_root }}/docs/docs/software/{{ service_item }}.md"
vars:
tor_domain: "{{ tor_http_domain_file.stdout | default('') }}"
when: "docs.enable == True and {{ service_item }}.source_service is undefined"
# - name: Copy {{ service_item }} documentation into place.
# template:
# src: roles/{{ service_item }}/docs.md
# dest: "{{ volumes_root }}/docs/docs/software/{{ service_item }}.md"
# vars:
# tor_domain: "{{ tor_http_domain_file.stdout | default('') }}"
# when: "docs.enable == True and service_item.source_service is undefined"
- name: Make {{ service_item }} directory.
file:
......@@ -14,7 +14,7 @@
- name: Copy {{ service_item }} docker-compose.yml file into place.
template:
src: docker-compose.{{ lookup('vars',service_item).source_service | default(service_item) }}.yml.j2
src: roles/{{ service_item }}/templates/docker-compose.{{ lookup('vars',service_item).source_service | default(service_item) }}.yml.j2
dest: "{{ volumes_root }}/{{ service_item }}/docker-compose.yml"
vars:
tor_domain: "{{ tor_http_domain_file.stdout | default('') }}"
......
# v2
Getting miniflux working first as an example, then will migrate the rest of the services.
Install k9s
Remove traefik install
Install longhorn
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.6.0/deploy/longhorn.yaml
Install kompose
```
curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-linux-amd64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose
```
Upgrade function
Add actual port definition based on port from service.yml
Use yq
Auto delete unneeded manifests
homelabos_traefik-networkpolicy.yaml
{{ service_item }}-networkpolicy.yaml
Add subPath to the PVC
Replace all _ with -
Add "sleep" command to DB deployment
Copy old data in to DB pod
Remove "sleep" command from DB deployment
Create ingress
# v1.1 Nice to haves
Re-enable mitogen.
Automount of volumes
......
......@@ -209,8 +209,7 @@
become: false
- name: Deploy enabled Services
include_role:
name: "{{ lookup('vars', service_item).source_service | default(service_item) }}"
include_tasks: roles/{{ lookup('vars', service_item).source_service | default(service_item) }}/tasks/main.yml
when: query
loop: "{{ services | flatten(1) }}"
loop_control:
......
---
- name: Setup {{service_item}}
include: includes/setup.yml
include_tasks: includes/setup.yml
- name: Start {{service_item}}
include: includes/start.yml
include_tasks: includes/start.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment