vm-tool 1.0.11__tar.gz → 1.0.12__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.
- {vm_tool-1.0.11/vm_tool.egg-info → vm_tool-1.0.12}/PKG-INFO +2 -2
- vm_tool-1.0.12/README.md +81 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/setup.py +2 -2
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/cli.py +1 -1
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/vm_setup/setup.yml +23 -3
- {vm_tool-1.0.11 → vm_tool-1.0.12/vm_tool.egg-info}/PKG-INFO +2 -2
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool.egg-info/SOURCES.txt +1 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/LICENSE +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/MANIFEST.in +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/setup.cfg +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/__init__.py +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/runner.py +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/ssh.py +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/vm_setup/docker/create_docker_service.yml +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/vm_setup/docker/install_docker_and_compose.yml +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool/vm_setup/inventory.yml +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool.egg-info/dependency_links.txt +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool.egg-info/entry_points.txt +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool.egg-info/requires.txt +0 -0
- {vm_tool-1.0.11 → vm_tool-1.0.12}/vm_tool.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: vm_tool
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
4
4
|
Summary: A Comprehensive Tool for Setting Up Virtual Machines Using Ansible.
|
|
5
5
|
License: MIT
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -15,7 +15,7 @@ Dynamic: requires-dist
|
|
|
15
15
|
Dynamic: summary
|
|
16
16
|
|
|
17
17
|
# **VM Setup Tool**
|
|
18
|
-
### **A Comprehensive Solution for Streamlining Virtual Machine Configuration
|
|
18
|
+
### **A Comprehensive Solution for Streamlining Virtual Machine Configuration**
|
|
19
19
|
|
|
20
20
|
## **Overview**
|
|
21
21
|
The **VM Setup Tool** is an efficient, user-friendly solution designed to simplify the process of setting up and managing virtual machines (VMs) using Ansible. Ideal for automating VM deployment and configuration, this tool ensures consistency and enhances operational efficiency across your infrastructure.
|
vm_tool-1.0.12/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# **VM Setup Tool**
|
|
2
|
+
### **A Comprehensive Solution for Streamlining Virtual Machine Configuration**
|
|
3
|
+
|
|
4
|
+
## **Overview**
|
|
5
|
+
The **VM Setup Tool** is an efficient, user-friendly solution designed to simplify the process of setting up and managing virtual machines (VMs) using Ansible. Ideal for automating VM deployment and configuration, this tool ensures consistency and enhances operational efficiency across your infrastructure.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## **Pre-requisites**
|
|
10
|
+
This tool supports projects utilizing **Docker Compose**. Ensure that a `docker-compose.yml` file is present at the root of your project directory before proceeding.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## **Installation**
|
|
15
|
+
Install the VM Setup Tool using **pip**, the Python package manager:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install vm-tool
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## **Example Usage**
|
|
24
|
+
|
|
25
|
+
### **Automated VM Setup**
|
|
26
|
+
Use the following example to configure and run the VM setup:
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from vm_tool.runner import SetupRunner
|
|
30
|
+
|
|
31
|
+
runner = SetupRunner(
|
|
32
|
+
github_username='your_github_username', # e.g., username
|
|
33
|
+
github_token='your_github_token', # e.g., token
|
|
34
|
+
github_project_url='your_github_project_url' # e.g., https://github.com/username/repo
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
runner.run_setup()
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### **What Happens During Setup**
|
|
41
|
+
The VM Setup Tool will:
|
|
42
|
+
1. Clone the specified GitHub repository to your local machine.
|
|
43
|
+
2. Install **Docker** if it’s not already available on the target machine.
|
|
44
|
+
3. Install **Docker Compose** for managing multi-container applications.
|
|
45
|
+
4. Create, enable, and start the Docker service.
|
|
46
|
+
5. Ensure the Docker container remains active, providing a robust environment for your applications.
|
|
47
|
+
|
|
48
|
+
By automating these tasks, the tool minimizes errors and saves time, allowing you to focus on development and deployment.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## **SSH Client Feature**
|
|
53
|
+
The **VM Setup Tool** also includes a dedicated **SSH client** feature to simplify the configuration of SSH access for VMs, including automated SSH key generation and management.
|
|
54
|
+
|
|
55
|
+
### **Example Usage**
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from vm_tool.ssh import SSHSetup
|
|
59
|
+
|
|
60
|
+
ssh_setup = SSHSetup(
|
|
61
|
+
hostname='your_vm_hostname', # e.g., vm.example.com
|
|
62
|
+
username='your_vm_username', # e.g., user
|
|
63
|
+
password='your_vm_password', # e.g., password
|
|
64
|
+
email='your_email_for_ssh_key' # e.g., user@example.com
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
ssh_setup.setup()
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### **What Happens During SSH Setup**
|
|
71
|
+
When you run the SSH setup, the tool will:
|
|
72
|
+
1. Generate an SSH key pair if none exists.
|
|
73
|
+
2. Read the public SSH key or create a new one if necessary.
|
|
74
|
+
3. Configure the VM by adding the public key to the VM's **authorized_keys** file.
|
|
75
|
+
4. Update the local SSH configuration file with the VM's details.
|
|
76
|
+
5. Establish an SSH connection to verify the setup.
|
|
77
|
+
6. Close the connection once setup is complete.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
With its comprehensive features, the **VM Setup Tool** eliminates the hassle of manual configurations and enables seamless integration of VMs into your workflows. Start using the tool today to automate and optimize your virtual machine setup process.
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
4
|
# Read the contents of README.md
|
|
5
|
-
readme_path = os.path.join(os.path.dirname(__file__), '
|
|
5
|
+
readme_path = os.path.join(os.path.dirname(__file__), 'README.md')
|
|
6
6
|
if os.path.exists(readme_path):
|
|
7
7
|
with open(readme_path, encoding='utf-8') as f:
|
|
8
8
|
long_description = f.read()
|
|
@@ -11,7 +11,7 @@ else:
|
|
|
11
11
|
|
|
12
12
|
setup(
|
|
13
13
|
name='vm_tool',
|
|
14
|
-
version='1.0.
|
|
14
|
+
version='1.0.12', # This will be updated by bump2version
|
|
15
15
|
packages=find_packages(),
|
|
16
16
|
description='A Comprehensive Tool for Setting Up Virtual Machines Using Ansible.',
|
|
17
17
|
long_description=long_description,
|
|
@@ -2,7 +2,7 @@ import argparse
|
|
|
2
2
|
|
|
3
3
|
def main():
|
|
4
4
|
parser = argparse.ArgumentParser(description='Setup VMs using Ansible.')
|
|
5
|
-
parser.add_argument('--version', action='version', version='1.0.
|
|
5
|
+
parser.add_argument('--version', action='version', version='1.0.12')
|
|
6
6
|
|
|
7
7
|
args = parser.parse_args()
|
|
8
8
|
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
github_project_url: "{{ lookup('env', 'GITHUB_PROJECT_URL') }}"
|
|
7
7
|
github_username: "{{ lookup('env', 'GITHUB_USERNAME') }}"
|
|
8
8
|
github_token: "{{ lookup('env', 'GITHUB_TOKEN') }}"
|
|
9
|
-
static_playbook_dir: "{{playbook_dir}}"
|
|
9
|
+
static_playbook_dir: "{{ playbook_dir }}"
|
|
10
10
|
|
|
11
11
|
tasks:
|
|
12
|
-
|
|
13
12
|
- name: Set project_dest_dir variable
|
|
14
13
|
set_fact:
|
|
15
14
|
project_dest_dir: "{{ static_playbook_dir }}/project"
|
|
@@ -54,4 +53,25 @@
|
|
|
54
53
|
state: started
|
|
55
54
|
enabled: yes
|
|
56
55
|
become: yes
|
|
57
|
-
ignore_errors: yes
|
|
56
|
+
ignore_errors: yes
|
|
57
|
+
|
|
58
|
+
# Cleanup section
|
|
59
|
+
- name: Remove GitHub credentials from git-credentials
|
|
60
|
+
file:
|
|
61
|
+
path: ~/.git-credentials
|
|
62
|
+
state: absent
|
|
63
|
+
become: yes
|
|
64
|
+
|
|
65
|
+
- name: Clear Git credential helper configuration
|
|
66
|
+
shell: git config --global --unset credential.helper
|
|
67
|
+
become: yes
|
|
68
|
+
|
|
69
|
+
- name: Unset environment variables
|
|
70
|
+
shell: |
|
|
71
|
+
unset GITHUB_PROJECT_URL
|
|
72
|
+
unset GITHUB_USERNAME
|
|
73
|
+
unset GITHUB_TOKEN
|
|
74
|
+
environment:
|
|
75
|
+
GITHUB_PROJECT_URL: "{{ github_project_url }}"
|
|
76
|
+
GITHUB_USERNAME: "{{ github_username }}"
|
|
77
|
+
GITHUB_TOKEN: "{{ github_token }}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: vm_tool
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
4
4
|
Summary: A Comprehensive Tool for Setting Up Virtual Machines Using Ansible.
|
|
5
5
|
License: MIT
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -15,7 +15,7 @@ Dynamic: requires-dist
|
|
|
15
15
|
Dynamic: summary
|
|
16
16
|
|
|
17
17
|
# **VM Setup Tool**
|
|
18
|
-
### **A Comprehensive Solution for Streamlining Virtual Machine Configuration
|
|
18
|
+
### **A Comprehensive Solution for Streamlining Virtual Machine Configuration**
|
|
19
19
|
|
|
20
20
|
## **Overview**
|
|
21
21
|
The **VM Setup Tool** is an efficient, user-friendly solution designed to simplify the process of setting up and managing virtual machines (VMs) using Ansible. Ideal for automating VM deployment and configuration, this tool ensures consistency and enhances operational efficiency across your infrastructure.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|