cleanup and minio upgrade

This commit is contained in:
Amarpreet Minhas 2025-01-15 00:14:45 -05:00
parent dfed4d0307
commit 1632037f82
13 changed files with 14 additions and 164 deletions
ansible
group_vars/all
host_vars
fishbowl.minhas.io
redwingcherokee.minhas.io
inventory.txt
playbooks
requirements.txt
roles/lnd
defaults
tasks
consul/acls
docker/sudoscientist-go-backend

View file

@ -1,7 +1,6 @@
---
# main
main_dc_name: columbia
admin_email_address: amarpreet@minhas.io
# minio
minio_version: RELEASE.2024-12-18T13-15-44Z
# hashicorp defaults
hashi_arch: amd64
@ -54,7 +53,4 @@ vault_ca_cert_payload: |
hMA1iwWJPmT9LsjMSUfxFTPzxRnNXQiKFz5kT2OiS1nqh8aOcyU9YC928pkifNJV
KokuDezJFM7ie3d+EcBk1V9lHwOWdto=
-----END CERTIFICATE-----
# minio
minio_version: RELEASE.2024-10-29T16-01-48Z
...

View file

@ -1,6 +0,0 @@
---
hashi_arch: arm
lnd_arch: armv7
bitcoind_disk: /dev/sda1
...

View file

@ -1,6 +0,0 @@
---
hashi_arch: arm
lnd_arch: armv7
bitcoind_disk: /dev/sda1
...

View file

@ -11,7 +11,6 @@ hardtack[1:7].minhas.io
teapot[01:06].minhas.io
[k3s]
hardtack[1:7].minhas.io
teapot[01:06].minhas.io

View file

@ -1,5 +0,0 @@
---
- hosts: lnd
roles:
- role: lnd
...

View file

@ -1,16 +1,16 @@
ansible==10.1.0
ansible-core==2.17.1
certifi==2024.6.2
cffi==1.16.0
charset-normalizer==3.3.2
cryptography==42.0.8
ansible==11.1.0
ansible-core==2.18.1
certifi==2024.12.14
cffi==1.17.1
charset-normalizer==3.4.1
cryptography==44.0.0
hvac==2.3.0
idna==3.7
Jinja2==3.1.4
MarkupSafe==2.1.5
packaging==24.1
idna==3.10
Jinja2==3.1.5
MarkupSafe==3.0.2
packaging==24.2
pycparser==2.22
PyYAML==6.0.1
PyYAML==6.0.2
requests==2.32.3
resolvelib==1.0.1
urllib3==2.2.2
urllib3==2.3.0

View file

@ -1,3 +0,0 @@
---
lnd_arch: amd64
...

View file

@ -1,53 +0,0 @@
---
- name: ensure go/bin dir exists for bitcoind user
file:
path: /home/bitcoind/go/bin
state: directory
owner: bitcoind
group: bitcoind
mode: 0750
- name: check if lnd is installed
stat:
path: /home/bitcoind/go/bin/lnd
register: lnd_binary
- name: check lnd version
shell: /home/bitcoind/go/bin/lnd --version | cut -d ' ' -f3
when: lnd_binary.stat.exists
changed_when: False
check_mode: False
register: lnd_installed_version
- name: stop lnd
systemd:
name: lnd
state: stopped
when: (lnd_binary.stat.exists == False) or (lnd_version != lnd_installed_version.stdout)
- name: remove old lnd files
file:
name: "/home/bitcoind/go/bin/{{ item }}"
state: absent
with_items:
- lncli
- lnd
when: (lnd_binary.stat.exists == False) or (lnd_version != lnd_installed_version.stdout)
- name: update lnd
unarchive:
src: "https://github.com/lightningnetwork/lnd/releases/download/v{{ lnd_version }}/lnd-linux-{{ lnd_arch }}-v{{ lnd_version }}.tar.gz"
dest: /home/bitcoind/go/bin
owner: bitcoind
group: bitcoind
list_files: True
remote_src: True
extra_opts: [--strip-components=1]
when: (lnd_binary.stat.exists == False) or (lnd_version != lnd_installed_version.stdout)
- name: ensure lnd is started
systemd:
name: lnd
state: started
enabled: true
...

View file

@ -1,13 +0,0 @@
agent_prefix "" {
policy = "write"
}
node_prefix "" {
policy = "write"
}
service_prefix "" {
policy = "read"
}
session_prefix "" {
policy = "read"
}

View file

@ -1,15 +0,0 @@
agent_prefix "" {
policy = "read"
}
node_prefix "" {
policy = "read"
}
service_prefix "" {
policy = "write"
}
key_prefix "" {
policy = read
}

View file

@ -1,14 +0,0 @@
agent_prefix "" {
policy = "read"
}
node_prefix "" {
policy = "read"
}
service_prefix "" {
policy = "write"
}
acl = "write"

View file

@ -1,16 +0,0 @@
key_prefix "vault/" {
policy = "write"
}
node_prefix "" {
policy = "write"
}
service "vault" {
policy = "write"
}
agent_prefix "" {
policy = "write"
}
session_prefix "" {
policy = "write"
}

View file

@ -1,14 +0,0 @@
FROM golang:alpine
RUN apk add --no-cache git && \
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest && \
mkdir -p ${GOPATH}/src/git.minhas.io/asara && \
cd ${GOPATH}/src/git.minhas.io/asara && \
git clone https://git.minhas.io/asara/sudoscientist-go-backend && \
cd ${GOPATH}/src/git.minhas.io/asara/sudoscientist-go-backend && \
go mod init && go get && go build -o /go/bin/sudoscientist-go-backend main.go && \
mv /go/bin/* /usr/local/bin/ && \
rm -rf /go/src && \
apk del git
CMD ["/usr/local/bin/sudoscientist-go-backend"]