py-pve-cloud 0.1.2__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of py-pve-cloud might be problematic. Click here for more details.
- {py_pve_cloud-0.1.2/src/py_pve_cloud.egg-info → py_pve_cloud-0.2.2}/PKG-INFO +1 -1
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/README.md +17 -2
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/pyproject.toml +1 -1
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/cli/pvclu.py +11 -3
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2/src/py_pve_cloud.egg-info}/PKG-INFO +1 -1
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/LICENSE +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/setup.cfg +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/cli/pvcli.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/lib/inventory.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/alchemy.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/alembic.ini +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/env.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/24a548bfce3e_len_rules_enforcements.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/27724e407e2b_proxy_fqdn.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/3c95509a5de9_fix.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/7868bcd05006_migrate_old.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/7dea8c4ee39f_init.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/944a8fd5d5bc_ext_ctrl_plns.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/d9b711555be8_ext_control_plane.py +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/py_pve_cloud.egg-info/SOURCES.txt +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/py_pve_cloud.egg-info/dependency_links.txt +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/py_pve_cloud.egg-info/entry_points.txt +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/py_pve_cloud.egg-info/requires.txt +0 -0
- {py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/py_pve_cloud.egg-info/top_level.txt +0 -0
|
@@ -10,12 +10,27 @@ edit `src/orm/alchemy.py` database classes and run `alembic revision --auto-ener
|
|
|
10
10
|
|
|
11
11
|
you also need to `export PG_CONN_STR=postgresql+psycopg2://postgres:{{ patroni_postgres_pw }}@{{ proxy or master ip }}:{{ 5000 / 5432 }}/pve_cloud?sslmode=disable` env variable first with a testing database for alembic to work against. to create a new migration the database needs to be on the latest version, run `alembic upgrade head` to upgrade it.
|
|
12
12
|
|
|
13
|
+
## Releasing to pypi manually
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
increment the version in pyproject.toml and run `pip install build==1.3.0 twine==6.2.0` and this to release:
|
|
15
16
|
|
|
16
17
|
```bash
|
|
17
|
-
|
|
18
|
+
export PYPI_TOKEN= # set pve cloud pypi account access token
|
|
19
|
+
|
|
18
20
|
rm -rf dist
|
|
19
21
|
python3 -m build
|
|
20
22
|
python3 -m twine upload dist/*
|
|
21
23
|
```
|
|
24
|
+
|
|
25
|
+
## Releasing via pipeline
|
|
26
|
+
|
|
27
|
+
add `*.*.*` as protected tag pattern under Repository settings in gitlab.
|
|
28
|
+
|
|
29
|
+
set the PYPI_TOKEN variable as a ci/cd variable.
|
|
30
|
+
|
|
31
|
+
increment the version in pyproject.toml, commit and tag the commit with the same semver version.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Developing locally
|
|
35
|
+
|
|
36
|
+
activate your venv and simply run `pip install -e .` to install this package in edit mode. Any changes will be live.
|
|
@@ -5,6 +5,7 @@ import socket
|
|
|
5
5
|
import paramiko
|
|
6
6
|
import dns.resolver
|
|
7
7
|
import base64
|
|
8
|
+
import re
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def get_cloud_domain(target_pve):
|
|
@@ -59,7 +60,13 @@ def get_cloud_env(pve_host):
|
|
|
59
60
|
|
|
60
61
|
patroni_pass = stdout.read().decode('utf-8').strip()
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
# fetch bind update key for ingress dns validation
|
|
64
|
+
_, stdout, _ = ssh.exec_command("sudo cat /etc/pve/cloud/secrets/internal.key")
|
|
65
|
+
bind_key_file = stdout.read().decode('utf-8')
|
|
66
|
+
|
|
67
|
+
bind_internal_key = re.search(r'secret\s+"([^"]+)";', bind_key_file).group(1)
|
|
68
|
+
|
|
69
|
+
return cluster_vars, patroni_pass, bind_internal_key
|
|
63
70
|
|
|
64
71
|
|
|
65
72
|
def get_online_pve_host_prsr(args):
|
|
@@ -90,7 +97,7 @@ def get_ssh_master_kubeconfig(cluster_vars, stack_name):
|
|
|
90
97
|
def export_envr(args):
|
|
91
98
|
ansible_host = get_online_pve_host(args.target_pve)
|
|
92
99
|
cloud_domain = get_cloud_domain(args.target_pve)
|
|
93
|
-
cluster_vars, patroni_pass = get_cloud_env(ansible_host)
|
|
100
|
+
cluster_vars, patroni_pass, bind_internal_key = get_cloud_env(ansible_host)
|
|
94
101
|
print(f"export PVE_ANSIBLE_HOST='{ansible_host}'")
|
|
95
102
|
print(f"export PVE_CLOUD_DOMAIN='{cloud_domain}'")
|
|
96
103
|
|
|
@@ -101,7 +108,8 @@ def export_envr(args):
|
|
|
101
108
|
print(f"export TF_VAR_cluster_proxy_ip='{cluster_vars['pve_haproxy_floating_ip_internal']}'")
|
|
102
109
|
print(f"export TF_VAR_pve_cloud_pg_cstr=\"postgresql+psycopg2://postgres:{patroni_pass}@{cluster_vars['pve_haproxy_floating_ip_internal']}:5000/pve_cloud?sslmode=disable\"")
|
|
103
110
|
print(f"export TF_VAR_master_b64_kubeconf='{get_ssh_master_kubeconfig(cluster_vars, args.stack_name)}'")
|
|
104
|
-
|
|
111
|
+
print(f"export TF_VAR_bind_master_ip='{cluster_vars['bind_master_ip']}'")
|
|
112
|
+
print(f"export TF_VAR_bind_internal_key='{bind_internal_key}'")
|
|
105
113
|
|
|
106
114
|
|
|
107
115
|
def main():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/3c95509a5de9_fix.py
RENAMED
|
File without changes
|
|
File without changes
|
{py_pve_cloud-0.1.2 → py_pve_cloud-0.2.2}/src/pve_cloud/orm/migrations/versions/7dea8c4ee39f_init.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|