vm-tool 1.0.33__py3-none-any.whl → 1.0.37__py3-none-any.whl
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.
- vm_tool/cli.py +1 -1
- vm_tool/runner.py +5 -1
- vm_tool/vm_setup/main.yml +1 -1
- vm_tool/vm_setup/push_code.yml +1 -38
- vm_tool/vm_setup/push_code_tasks.yml +38 -0
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/METADATA +1 -1
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/RECORD +11 -10
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/WHEEL +0 -0
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/entry_points.txt +0 -0
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/licenses/LICENSE +0 -0
- {vm_tool-1.0.33.dist-info → vm_tool-1.0.37.dist-info}/top_level.txt +0 -0
vm_tool/cli.py
CHANGED
|
@@ -6,7 +6,7 @@ def main():
|
|
|
6
6
|
parser = argparse.ArgumentParser(
|
|
7
7
|
description="VM Tool: Setup, Provision, and Manage VMs"
|
|
8
8
|
)
|
|
9
|
-
parser.add_argument("--version", action="version", version="1.0.
|
|
9
|
+
parser.add_argument("--version", action="version", version="1.0.37")
|
|
10
10
|
parser.add_argument(
|
|
11
11
|
"--verbose", "-v", action="store_true", help="Enable verbose output"
|
|
12
12
|
)
|
vm_tool/runner.py
CHANGED
|
@@ -373,7 +373,11 @@ class SetupRunner:
|
|
|
373
373
|
with open(generated_inventory_path, "w") as f:
|
|
374
374
|
yaml.dump(inventory_content, f)
|
|
375
375
|
|
|
376
|
-
target_inventory =
|
|
376
|
+
target_inventory = generated_inventory_path
|
|
377
|
+
|
|
378
|
+
else:
|
|
379
|
+
# If not generating dynamic inventory, ensure the provided inventory path is absolute
|
|
380
|
+
target_inventory = os.path.abspath(inventory_file)
|
|
377
381
|
|
|
378
382
|
logger.info(
|
|
379
383
|
f"Starting Docker deployment using {compose_file} on {target_inventory}..."
|
vm_tool/vm_setup/main.yml
CHANGED
vm_tool/vm_setup/push_code.yml
CHANGED
|
@@ -2,41 +2,4 @@
|
|
|
2
2
|
hosts: all
|
|
3
3
|
gather_facts: false
|
|
4
4
|
tasks:
|
|
5
|
-
-
|
|
6
|
-
file:
|
|
7
|
-
path: "{{ project_dest_dir }}"
|
|
8
|
-
state: directory
|
|
9
|
-
mode: '0755'
|
|
10
|
-
|
|
11
|
-
- name: Copy project files to target
|
|
12
|
-
copy:
|
|
13
|
-
src: "{{ playbook_dir }}/../../"
|
|
14
|
-
dest: "{{ project_dest_dir }}/"
|
|
15
|
-
# Note: In ansible-runner, playbook_dir is inside private_data_dir/project/vm_setup.
|
|
16
|
-
# We need to be careful about the source path.
|
|
17
|
-
# However, ansible_runner isolates execution.
|
|
18
|
-
# Better approach: Pass SOURCE_PATH as extravar.
|
|
19
|
-
when: false # Placeholder, we will use synchronize or better strategy.
|
|
20
|
-
|
|
21
|
-
# Re-thinking: simple 'copy' of just the compose file is safer for now if we don't know build context.
|
|
22
|
-
# But usually context is needed.
|
|
23
|
-
# Let's rely on 'synchronize' (rsync) if available, or just copy the compose file if user only provided that.
|
|
24
|
-
|
|
25
|
-
# For MVP of 'deploy-docker', let's copy the DOCKER_COMPOSE_FILE_PATH and .env if exists.
|
|
26
|
-
- name: Copy Docker Compose file
|
|
27
|
-
copy:
|
|
28
|
-
src: "{{ SOURCE_PATH }}/{{ DOCKER_COMPOSE_FILE_PATH }}"
|
|
29
|
-
dest: "{{ project_dest_dir }}/{{ DOCKER_COMPOSE_FILE_PATH }}"
|
|
30
|
-
|
|
31
|
-
- name: Copy Env file
|
|
32
|
-
copy:
|
|
33
|
-
src: "{{ SOURCE_PATH }}/{{ ENV_FILE_PATH | default('.env') }}"
|
|
34
|
-
dest: "{{ project_dest_dir }}/{{ ENV_FILE_PATH | default('.env') }}"
|
|
35
|
-
failed_when: false
|
|
36
|
-
|
|
37
|
-
- name: Deploy application
|
|
38
|
-
shell: "{{ DEPLOY_COMMAND | default('docker-compose up -d --remove-orphans') }}"
|
|
39
|
-
args:
|
|
40
|
-
chdir: "{{ project_dest_dir }}"
|
|
41
|
-
environment:
|
|
42
|
-
GITHUB_REPOSITORY_OWNER: "{{ GITHUB_REPOSITORY_OWNER | default('') }}"
|
|
5
|
+
- include_tasks: push_code_tasks.yml
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
- name: Ensure project directory exists
|
|
2
|
+
file:
|
|
3
|
+
path: "{{ project_dest_dir }}"
|
|
4
|
+
state: directory
|
|
5
|
+
mode: '0755'
|
|
6
|
+
|
|
7
|
+
- name: Copy project files to target
|
|
8
|
+
copy:
|
|
9
|
+
src: "{{ playbook_dir }}/../../"
|
|
10
|
+
dest: "{{ project_dest_dir }}/"
|
|
11
|
+
# Note: In ansible-runner, playbook_dir is inside private_data_dir/project/vm_setup.
|
|
12
|
+
# We need to be careful about the source path.
|
|
13
|
+
# However, ansible_runner isolates execution.
|
|
14
|
+
# Better approach: Pass SOURCE_PATH as extravar.
|
|
15
|
+
when: false # Placeholder, we will use synchronize or better strategy.
|
|
16
|
+
|
|
17
|
+
# Re-thinking: simple 'copy' of just the compose file is safer for now if we don't know build context.
|
|
18
|
+
# But usually context is needed.
|
|
19
|
+
# Let's rely on 'synchronize' (rsync) if available, or just copy the compose file if user only provided that.
|
|
20
|
+
|
|
21
|
+
# For MVP of 'deploy-docker', let's copy the DOCKER_COMPOSE_FILE_PATH and .env if exists.
|
|
22
|
+
- name: Copy Docker Compose file
|
|
23
|
+
copy:
|
|
24
|
+
src: "{{ SOURCE_PATH }}/{{ DOCKER_COMPOSE_FILE_PATH }}"
|
|
25
|
+
dest: "{{ project_dest_dir }}/{{ DOCKER_COMPOSE_FILE_PATH }}"
|
|
26
|
+
|
|
27
|
+
- name: Copy Env file
|
|
28
|
+
copy:
|
|
29
|
+
src: "{{ SOURCE_PATH }}/{{ ENV_FILE_PATH | default('.env') }}"
|
|
30
|
+
dest: "{{ project_dest_dir }}/{{ ENV_FILE_PATH | default('.env') }}"
|
|
31
|
+
failed_when: false
|
|
32
|
+
|
|
33
|
+
- name: Deploy application
|
|
34
|
+
shell: "{{ DEPLOY_COMMAND | default('docker-compose up -d --remove-orphans') }}"
|
|
35
|
+
args:
|
|
36
|
+
chdir: "{{ project_dest_dir }}"
|
|
37
|
+
environment:
|
|
38
|
+
GITHUB_REPOSITORY_OWNER: "{{ GITHUB_REPOSITORY_OWNER | default('') }}"
|
|
@@ -24,7 +24,7 @@ vm_tool/alerting.py,sha256=6bNfQNSAQ_SJW9dQfB8s8gDZ-7ocYw4Q211VM6FWiXU,8269
|
|
|
24
24
|
vm_tool/audit.py,sha256=spVtMcwadTkD9lELH1tur7Dr3OHjajk44ZatKYEbeVI,3388
|
|
25
25
|
vm_tool/backup.py,sha256=WhwCXXJDYCQgoexroksNhWgB5ki6HUly0JhQ9ybCdMg,4130
|
|
26
26
|
vm_tool/benchmarking.py,sha256=9AZ4JwKd5aEjwtKnhsuFa77y6WSO_fSEIqgMh3w_Btw,6212
|
|
27
|
-
vm_tool/cli.py,sha256=
|
|
27
|
+
vm_tool/cli.py,sha256=cHvKkAx4HPsPYoAYULq1V-rfGfJgJ4Ix-clS8iT2nSM,28597
|
|
28
28
|
vm_tool/cloud.py,sha256=1fQV1o3wCth55B1hSenME_j2n5gCJDo9gtUcqDxCs7s,4047
|
|
29
29
|
vm_tool/completion.py,sha256=U8W8mmNdR0Ci0WjlEIa8CLOUtaVLZ5tWYpqViBBIBF8,7431
|
|
30
30
|
vm_tool/compliance.py,sha256=7yXrvRoPxJMW0DTVhJ-ZxbaJo7quDSVgae2_mYbVAmE,3173
|
|
@@ -41,7 +41,7 @@ vm_tool/policy.py,sha256=Z05TLSqMu-tSM0_SnCdsIZqebHGRtXNSRLwkOBDthtY,6072
|
|
|
41
41
|
vm_tool/rbac.py,sha256=hdFzh4QhUuQmGmMXBuG-o21FdEp1fb8WSJrCWAz-drI,3999
|
|
42
42
|
vm_tool/recovery.py,sha256=fesho6Pi_ItRkdtiNK2bh-8Q_T98kSn2LZwKovMFsWI,5473
|
|
43
43
|
vm_tool/reporting.py,sha256=yiLdArTfu7A8-PWL3dmFSRNpcMvBSq1iHNw6YJRO1hI,7419
|
|
44
|
-
vm_tool/runner.py,sha256=
|
|
44
|
+
vm_tool/runner.py,sha256=qht4Wdg9XB1Jw4IHqpogMX0yBtn77BLz58hbSfjUNXw,17626
|
|
45
45
|
vm_tool/secrets.py,sha256=bvbunxt4dLupFZQs3VUHkxDOASoBgtpggO0oavTuzOk,9397
|
|
46
46
|
vm_tool/ssh.py,sha256=c9Nxs20VEq--qWCLZyc6uRqgny2-OCSwnTlcx9bZJtg,4905
|
|
47
47
|
vm_tool/state.py,sha256=DxJoRLITwT8mWcs_eAgFNTDfcrGh4PMdQuFjdGb1n6Y,4079
|
|
@@ -54,10 +54,11 @@ vm_tool/strategies/canary.py,sha256=heLW3599IBXTp9m79MKB5Lo-XO93jUf8Ehs3cM_q_Q4,
|
|
|
54
54
|
vm_tool/vm_setup/cleanup.yml,sha256=7eToWeIyoOEGWpm-bisoxymo1b-R8yPdF2AeukPyMUk,863
|
|
55
55
|
vm_tool/vm_setup/inventory.yml,sha256=_dV8RYKfHA9vMq5WJg9jpplR8_R_lh6F0fA3tzAY6oY,34
|
|
56
56
|
vm_tool/vm_setup/k8s.yml,sha256=Rn7dypJ_ccf_LxFSECuGFWpRrkX5svrt5IHJbjMmll0,342
|
|
57
|
-
vm_tool/vm_setup/main.yml,sha256=
|
|
57
|
+
vm_tool/vm_setup/main.yml,sha256=QUWUFf7W1y9dvfL-sfYIgh491cxRBTm521jI4he24Jg,657
|
|
58
58
|
vm_tool/vm_setup/monitoring.yml,sha256=u4WhkO2P6O2Mrqo02z8G_FshcFjAbY1Avve5mb5sxZs,1090
|
|
59
59
|
vm_tool/vm_setup/project_service.yml,sha256=YlvRx9XgW2X1MsKa9XWr7LWK-BET2zFly8Q-7cNedH4,545
|
|
60
|
-
vm_tool/vm_setup/push_code.yml,sha256=
|
|
60
|
+
vm_tool/vm_setup/push_code.yml,sha256=U5zqx04oV2S4U4VsXaecn8S9_UrZGEcTjKbhIZdCgs8,112
|
|
61
|
+
vm_tool/vm_setup/push_code_tasks.yml,sha256=ral6r4-vJI9nnG1ttxYi6zLb-4ricDmwWKMIxNuh8hg,1500
|
|
61
62
|
vm_tool/vm_setup/setup.yml,sha256=D3qsBkzWEWEgeAmxO7bk99wxUaFImeSbZNVa3I2BXR8,659
|
|
62
63
|
vm_tool/vm_setup/setup_project_env.yml,sha256=Q4K6ZgGfgP8pW-QKV3Wkvb0V82AGjHoWB9TM8xq2Nd0,274
|
|
63
64
|
vm_tool/vm_setup/docker/create_docker_service.yml,sha256=C4nZpFBVzA7_xn0PEMIpYjXcYyA73ClxdMQgTh319eI,2140
|
|
@@ -65,9 +66,9 @@ vm_tool/vm_setup/docker/docker_setup.yml,sha256=kg6Abu3TjcLwV0JHnCAVUkj5l2HaGf7O
|
|
|
65
66
|
vm_tool/vm_setup/docker/install_docker_and_compose.yml,sha256=NxPm4YkOekRH0dpJQVgxjcSqrmT6f912Dv0owYsLBxE,3402
|
|
66
67
|
vm_tool/vm_setup/docker/login_to_docker_hub.yml,sha256=y9WaWLb1f1SuHVa1NNm24Gvf5bbwQ8eqEsImGLHGHGU,223
|
|
67
68
|
vm_tool/vm_setup/github/git_configuration.yml,sha256=hKuzOFsVlYRoBAXujREfrLiqV7j4RnQYbL5s63AEAqk,2355
|
|
68
|
-
vm_tool-1.0.
|
|
69
|
-
vm_tool-1.0.
|
|
70
|
-
vm_tool-1.0.
|
|
71
|
-
vm_tool-1.0.
|
|
72
|
-
vm_tool-1.0.
|
|
73
|
-
vm_tool-1.0.
|
|
69
|
+
vm_tool-1.0.37.dist-info/licenses/LICENSE,sha256=4OO6Zd_hYEOemzTNdgUR_E7oNvUJLuN2E7ZAgm7DcSM,1063
|
|
70
|
+
vm_tool-1.0.37.dist-info/METADATA,sha256=Orm2Keg6e-cmwHyhWUiscPTeoraVV2FCPcOC4KIP9O4,6191
|
|
71
|
+
vm_tool-1.0.37.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
72
|
+
vm_tool-1.0.37.dist-info/entry_points.txt,sha256=A2EAvw95ftFXzVAWfHKIM-SsxQVxrIrByRNe-ArOp2k,45
|
|
73
|
+
vm_tool-1.0.37.dist-info/top_level.txt,sha256=jTLckJpKvJplpmKoMhPz2YKp_sQB9Q5-cCGmUHCp06M,17
|
|
74
|
+
vm_tool-1.0.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|