Skip to content

Commit 0c8abff

Browse files
authored
Release 2.1.0 (#850)
1 parent 4901a51 commit 0c8abff

File tree

12 files changed

+1915
-815
lines changed

12 files changed

+1915
-815
lines changed

automation/roles/cloud-resources/tasks/aws.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,54 @@
33
- name: Install Python dependencies
44
block:
55
- name: Ensure that 'python3-pip' package is present on controlling host
6+
ansible.builtin.command: which pip3
7+
register: pip3_check
8+
failed_when: false
9+
changed_when: false
10+
11+
- name: Clean dnf cache
12+
ansible.builtin.command: dnf clean all
13+
when:
14+
- pip3_check.rc != 0
15+
- ansible_os_family == "RedHat"
16+
17+
- name: Update apt cache
18+
ansible.builtin.apt:
19+
update_cache: true
20+
cache_valid_time: 3600
21+
register: apt_status
22+
until: apt_status is success
23+
delay: 5
24+
retries: 3
25+
when:
26+
- pip3_check.rc != 0
27+
- ansible_os_family == "Debian"
28+
29+
- name: Install 'python3-pip' package on controlling host
630
ansible.builtin.package:
731
name: python3-pip
832
state: present
933
register: package_status
1034
until: package_status is success
1135
delay: 10
1236
retries: 3
13-
delegate_to: 127.0.0.1
14-
run_once: true
15-
when: ansible_distribution != "MacOSX"
37+
when:
38+
- pip3_check.rc != 0
39+
- ansible_distribution != "MacOSX"
1640

1741
- name: Ensure that 'boto3' dependency is present on controlling host
1842
ansible.builtin.pip:
1943
name: boto3
44+
executable: pip3
2045
extra_args: --user
21-
delegate_to: 127.0.0.1
2246
become: false
2347
vars:
2448
ansible_become: false
25-
run_once: true
2649
environment:
2750
PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin"
2851
PIP_BREAK_SYSTEM_PACKAGES: "1"
52+
delegate_to: 127.0.0.1
53+
run_once: true
2954

3055
# SSH key
3156
- block:
@@ -209,8 +234,8 @@
209234
security_groups: "{{ ([] if not cloud_firewall | bool else [patroni_cluster_name + '-security-group']) }}"
210235
vpc_subnet_id: "{{ server_network }}"
211236
network_interfaces:
212-
assign_public_ip: true
213-
delete_on_termination: true
237+
- assign_public_ip: true
238+
delete_on_termination: true
214239
volumes:
215240
- device_name: /dev/sda1
216241
ebs:

automation/roles/cloud-resources/tasks/azure.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,40 @@
33
- name: Install Python dependencies
44
block:
55
- name: Ensure that 'python3-pip' package is present on controlling host
6+
ansible.builtin.command: which pip3
7+
register: pip3_check
8+
failed_when: false
9+
changed_when: false
10+
11+
- name: Clean dnf cache
12+
ansible.builtin.command: dnf clean all
13+
when:
14+
- pip3_check.rc != 0
15+
- ansible_os_family == "RedHat"
16+
17+
- name: Update apt cache
18+
ansible.builtin.apt:
19+
update_cache: true
20+
cache_valid_time: 3600
21+
register: apt_status
22+
until: apt_status is success
23+
delay: 5
24+
retries: 3
25+
when:
26+
- pip3_check.rc != 0
27+
- ansible_os_family == "Debian"
28+
29+
- name: Install 'python3-pip' package on controlling host
630
ansible.builtin.package:
731
name: python3-pip
832
state: present
933
register: package_status
1034
until: package_status is success
1135
delay: 10
1236
retries: 3
13-
when: ansible_distribution != "MacOSX"
37+
when:
38+
- pip3_check.rc != 0
39+
- ansible_distribution != "MacOSX"
1440

1541
- name: Ensure that Azure collection is installed on controlling host
1642
ansible.builtin.command: ansible-galaxy collection list azure.azcollection

automation/roles/cloud-resources/tasks/digitalocean.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,69 @@
33
- name: Install Python dependencies
44
block:
55
- name: Ensure that 'python3-pip' package is present on controlling host
6+
ansible.builtin.command: which pip3
7+
register: pip3_check
8+
failed_when: false
9+
changed_when: false
10+
11+
- name: Clean dnf cache
12+
ansible.builtin.command: dnf clean all
13+
when:
14+
- pip3_check.rc != 0
15+
- ansible_os_family == "RedHat"
16+
17+
- name: Update apt cache
18+
ansible.builtin.apt:
19+
update_cache: true
20+
cache_valid_time: 3600
21+
register: apt_status
22+
until: apt_status is success
23+
delay: 5
24+
retries: 3
25+
when:
26+
- pip3_check.rc != 0
27+
- ansible_os_family == "Debian"
28+
29+
- name: Install 'python3-pip' package on controlling host
630
ansible.builtin.package:
731
name: python3-pip
832
state: present
933
register: package_status
1034
until: package_status is success
1135
delay: 10
1236
retries: 3
13-
delegate_to: 127.0.0.1
14-
run_once: true
15-
when: ansible_distribution != "MacOSX"
37+
when:
38+
- pip3_check.rc != 0
39+
- ansible_distribution != "MacOSX"
1640

1741
- name: Ensure that 'dopy' dependency is present on controlling host
1842
ansible.builtin.pip:
1943
name: dopy
44+
executable: pip3
2045
extra_args: --user
21-
delegate_to: 127.0.0.1
2246
become: false
2347
vars:
2448
ansible_become: false
25-
run_once: true
2649
environment:
2750
PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin"
2851
PIP_BREAK_SYSTEM_PACKAGES: "1"
2952

3053
- name: Ensure that 'boto3' dependency is present on controlling host
3154
ansible.builtin.pip:
3255
name: boto3
56+
executable: pip3
3357
extra_args: --user
34-
delegate_to: 127.0.0.1
3558
become: false
3659
vars:
3760
ansible_become: false
38-
run_once: true
3961
when:
4062
- (pgbackrest_install | bool or wal_g_install | bool)
4163
- digital_ocean_spaces_create | bool
4264
environment:
4365
PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin"
4466
PIP_BREAK_SYSTEM_PACKAGES: "1"
67+
delegate_to: 127.0.0.1
68+
run_once: true
4569

4670
# SSH key
4771
- block:

automation/roles/cloud-resources/tasks/gcp.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,54 @@
33
- name: Install Python dependencies
44
block:
55
- name: Ensure that 'python3-pip' package is present on controlling host
6+
ansible.builtin.command: which pip3
7+
register: pip3_check
8+
failed_when: false
9+
changed_when: false
10+
11+
- name: Clean dnf cache
12+
ansible.builtin.command: dnf clean all
13+
when:
14+
- pip3_check.rc != 0
15+
- ansible_os_family == "RedHat"
16+
17+
- name: Update apt cache
18+
ansible.builtin.apt:
19+
update_cache: true
20+
cache_valid_time: 3600
21+
register: apt_status
22+
until: apt_status is success
23+
delay: 5
24+
retries: 3
25+
when:
26+
- pip3_check.rc != 0
27+
- ansible_os_family == "Debian"
28+
29+
- name: Install 'python3-pip' package on controlling host
630
ansible.builtin.package:
731
name: python3-pip
832
state: present
933
register: package_status
1034
until: package_status is success
1135
delay: 10
1236
retries: 3
13-
delegate_to: 127.0.0.1
14-
run_once: true
15-
when: ansible_distribution != "MacOSX"
37+
when:
38+
- pip3_check.rc != 0
39+
- ansible_distribution != "MacOSX"
1640

1741
- name: Ensure that 'google-auth' dependency is present on controlling host
1842
ansible.builtin.pip:
1943
name: google-auth
44+
executable: pip3
2045
extra_args: --user
21-
delegate_to: 127.0.0.1
2246
become: false
2347
vars:
2448
ansible_become: false
25-
run_once: true
2649
environment:
2750
PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin"
2851
PIP_BREAK_SYSTEM_PACKAGES: "1"
52+
delegate_to: 127.0.0.1
53+
run_once: true
2954

3055
# Check if GCP_SERVICE_ACCOUNT_CONTENTS is defined
3156
- name: Lookup the GCP_SERVICE_ACCOUNT_CONTENTS environmental variable

automation/roles/cloud-resources/tasks/hetzner.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,57 @@
11
---
22
# Dependencies
3-
- name: Install python dependencies
3+
- name: Install Python dependencies
44
block:
55
- name: Ensure that 'python3-pip' package is present on controlling host
6+
ansible.builtin.command: which pip3
7+
register: pip3_check
8+
failed_when: false
9+
changed_when: false
10+
11+
- name: Clean dnf cache
12+
ansible.builtin.command: dnf clean all
13+
when:
14+
- pip3_check.rc != 0
15+
- ansible_os_family == "RedHat"
16+
17+
- name: Update apt cache
18+
ansible.builtin.apt:
19+
update_cache: true
20+
cache_valid_time: 3600
21+
register: apt_status
22+
until: apt_status is success
23+
delay: 5
24+
retries: 3
25+
when:
26+
- pip3_check.rc != 0
27+
- ansible_os_family == "Debian"
28+
29+
- name: Install 'python3-pip' package on controlling host
630
ansible.builtin.package:
731
name: python3-pip
832
state: present
933
register: package_status
1034
until: package_status is success
1135
delay: 10
1236
retries: 3
13-
delegate_to: 127.0.0.1
14-
run_once: true
15-
when: ansible_distribution != "MacOSX"
37+
when:
38+
- pip3_check.rc != 0
39+
- ansible_distribution != "MacOSX"
1640

1741
- name: Ensure that 'hcloud' dependency is present on controlling host
1842
ansible.builtin.pip:
1943
name: hcloud
44+
executable: pip3
2045
extra_args: --user
21-
delegate_to: 127.0.0.1
2246
become: false
2347
vars:
2448
ansible_become: false
2549
run_once: true
2650
environment:
2751
PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin"
2852
PIP_BREAK_SYSTEM_PACKAGES: "1"
53+
delegate_to: 127.0.0.1
54+
run_once: true
2955

3056
# SSH key
3157
- block:

console/db/migrations/20241205103951_2.1.0.sql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ INSERT INTO public.cloud_instances (cloud_provider, instance_group, instance_nam
5555
('hetzner', 'Small Size', 'CPX31', 4, 8, 0.025 , 15.59, '$', '2024-12-10', true),
5656
('hetzner', 'Medium Size', 'CPX41', 8, 16, 0.0464 , 28.09, '$', '2024-12-10', true),
5757
('hetzner', 'Medium Size', 'CPX51', 16, 32, 0.0979 , 61.09, '$', '2024-12-10', true);
58-
5958

6059
-- Update all existing Hetzner instances to use USD instead of EUR for easy comparison to other IaaS Providers.
61-
-- cloud_instances
6260
-- Update prices and other relevant fields for Hetzner cloud instances indludes an IPv4 address
6361
UPDATE public.cloud_instances SET price_hourly = 0.0082, price_monthly = 5.09, currency = '$', updated_at = '2024-12-10', shared_cpu = true WHERE cloud_provider = 'hetzner' AND instance_name = 'CPX11';
6462
UPDATE public.cloud_instances SET price_hourly = 0.0138, price_monthly = 8.59, currency = '$', updated_at = '2024-12-10', shared_cpu = true WHERE cloud_provider = 'hetzner' AND instance_name = 'CPX21';
@@ -74,5 +72,4 @@ UPDATE public.cloud_instances SET price_hourly = 0.5138, price_monthly = 320.59,
7472
UPDATE public.cloud_volumes SET price_monthly = 0.05, currency = '$', updated_at = '2024-12-10' WHERE cloud_provider = 'hetzner';
7573

7674
-- +goose Down
77-
DELETE FROM public.postgres_versions
78-
WHERE major_version = 17;
75+
DELETE FROM public.postgres_versions WHERE major_version = 17;

console/service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ PG_CONSOLE_DB_MIGRATIONDIR String /etc/db/migrations
5757
PG_CONSOLE_ENCRYPTIONKEY String super_secret Encryption key for secret storage
5858
PG_CONSOLE_DOCKER_HOST String unix:///var/run/docker.sock Docker host
5959
PG_CONSOLE_DOCKER_LOGDIR String /tmp/ansible Directory inside docker container for ansible json log
60-
PG_CONSOLE_DOCKER_IMAGE String autobase/automation:2.0.0 Docker image for autobase automation
60+
PG_CONSOLE_DOCKER_IMAGE String autobase/automation:2.1.0 Docker image for autobase automation
6161
PG_CONSOLE_LOGWATCHER_RUNEVERY Duration 1m LogWatcher run interval
6262
PG_CONSOLE_LOGWATCHER_ANALYZEPAST Duration 48h LogWatcher gets operations to analyze which created_at > now() - AnalyzePast
6363
PG_CONSOLE_CLUSTERWATCHER_RUNEVERY Duration 1m ClusterWatcher run interval

console/service/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.1.0

console/service/api/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ swagger: '2.0'
33
info:
44
title: autobase console
55
description: API for autobase console
6-
version: 2.0.0
6+
version: 2.1.0
77
host: localhost:8080
88
schemes:
99
- http

console/service/internal/configuration/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type Config struct {
4343
Docker struct {
4444
Host string `default:"unix:///var/run/docker.sock" desc:"Docker host"`
4545
LogDir string `default:"/tmp/ansible" desc:"Directory inside docker container for ansible json log"`
46-
Image string `default:"autobase/automation:2.0.0" desc:"Docker image for autobase automation"`
46+
Image string `default:"autobase/automation:2.1.0" desc:"Docker image for autobase automation"`
4747
}
4848
LogWatcher struct {
4949
RunEvery time.Duration `default:"1m" desc:"LogWatcher run interval"`

0 commit comments

Comments
 (0)