Skip to content

Commit 474520f

Browse files
authored
Merge pull request #10 from Zuehlke/feature/update-readme
Update README
2 parents 2b2fb71 + 5e58595 commit 474520f

1 file changed

Lines changed: 41 additions & 26 deletions

File tree

README.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11

22
# Linux Developer VM Example / Template
33

4-
[![Circle CI](https://circleci.com/gh/Zuehlke/linux-developer-vm-with-ansible/tree/master.svg?style=shield)](https://circleci.com/gh/Zuehlke/linux-developer-vm-with-ansible/tree/master)
5-
64
A minimal example / template project for an Ansible-managed Linux Developer VM.
75

8-
![Linux Developer VM Screenshot](https://user-images.githubusercontent.com/365744/79437115-0b707300-7fd2-11ea-964f-0b5a0ff36d05.png)
6+
![Linux Developer VM Screenshot](https://user-images.githubusercontent.com/365744/122089607-3721ff80-ce07-11eb-801e-661715e95aaa.png)
97

108
It's meant to be copy/pasted and filled with life. The `roles/` directory contains the roles
119
for setting up the VM, the `spec/` directory contains the tests that come along with it.
@@ -15,12 +13,15 @@ All your specific customizations go in there!
1513

1614
For the Chef-based equivalent of it, see https://github.com/Zuehlke/linux-developer-vm
1715

18-
1916
## What's included?
2017

2118
### Main tools
2219

23-
These are the main tools included in this developer VM (see CHANGELOG for the specific versions):
20+
These are the main tools included in this developer VM:
21+
22+
* ...(add your tools here)
23+
24+
Apart from the above, the following tools are used to set up and maintain this developer VM:
2425

2526
* [Ansible](https://docs.ansible.com/ansible/latest/index.html) - for managing / installing this developer VM
2627
* [Ansible-lint](https://github.com/ansible/ansible-lint) - to ensure best practices when adding more Ansible roles
@@ -61,21 +62,22 @@ You can run these commands from anywhere inside the developer VM:
6162

6263
### Further Usage Instructions
6364

64-
For further instructions, please refer to the README.md that is placed on the Desktop of the Developer VM:
65+
For general instructions, please refer to the README.md that is placed on the Desktop of the Developer VM:
6566

66-
* https://github.com/Zuehlke/linux-developer-vm-with-ansible/blob/master/roles/readme/files/README.md
67+
* [roles/readme/files/README.md](./roles/readme/files/README.md)
6768

6869

69-
## Development
70+
## Building and Packaging the VM
7071

7172
### Prerequisites
7273

73-
You only need [VirtualBox](http://virtualbox.org/wiki/Downloads) and [Vagrant](http://www.vagrantup.com/)
74-
installed.
74+
You only need [VirtualBox](http://virtualbox.org/wiki/Downloads) and [Vagrant](http://www.vagrantup.com/) installed.
75+
76+
If you want to build a VMware .ova image, you will need a [VMware Workstation (Pro) or VMware Fusion](https://www.vmware.com/products/desktop-hypervisor.html) + [Vagrant VMware Plugin](https://www.vagrantup.com/vmware).
7577

7678
All other requirements, including Ansible will be installed *inside the Vagrant VM* during provisioning, i.e. you don't need them installed on your host machine.
7779

78-
### Basic Development Workflow
80+
### Building
7981

8082
Bring up the developer VM:
8183
```
@@ -97,28 +99,27 @@ should see all tests passing:
9799
```
98100
...
99101
default: ============================= test session starts ==============================
100-
default: platform linux -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
101-
default: cachedir: .pytest_cache
102+
default: platform linux -- Python 3.8.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
102103
default: rootdir: /home/user/vm-setup
103-
default: plugins: testinfra-5.0.0, spec-2.0.0
104-
default: collecting ...
104+
default: plugins: testinfra-6.3.0, spec-3.2.0
105105
default: collected 8 items
106106
default:
107107
default: spec/test_ansible.py:
108-
default: ✓ Ansible is installed at version 2 9 6 [local]
109-
default: ✓ Ansible commands are found [local]
110-
default: ✓ Ansible version command reports version 2 9 6 [local]
108+
default: ✓ Ansible is installed at version 2 9 22 [local]
109+
default: ✓ Ansible commands are found [local]
110+
default: ✓ Ansible version command reports version 2 9 22 [local]
111111
default:
112112
default: spec/test_ansible_lint.py:
113-
default: ✓ Ansible lint is installed at version 4 2 0 [local]
114-
default: ✓ Ansible lint command is found [local]
115-
default: ✓ Ansible lint version command reports version 4 2 0 [local]
113+
default: ✓ Ansible lint is installed at version 5 0 12 [local]
114+
default: ✓ Ansible lint command is found [local]
115+
default: ✓ Ansible lint version command reports version 5 0 12 [local]
116116
default:
117117
default: spec/test_testinfra.py:
118-
default: ✓ Testinfra is installed at version 5 0 0 [local]
119-
default: ✓ Pytest spec is installed at version 2 0 0 [local]
118+
default: ✓ Testinfra is installed at version 6 3 0 [local]
119+
default: ✓ Pytest spec is installed at version 3 2 0 [local] [100%]
120+
default:
120121
default:
121-
default: ============================== 8 passed in 4.05s ===============================
122+
default: ============================== 8 passed in 28.56s ==============================
122123
```
123124

124125
If these are passing as expected, you can continue developing on the Ansible roles within this repo.
@@ -145,20 +146,34 @@ First, unmount the /vagrant shared folder:
145146
$ vagrant ssh -c "sudo umount /vagrant -f"
146147
```
147148

148-
Finally, shutdown the VM, remove the sharedfolder, and export the VM as an .ova file:
149+
Then remove the vagrant user account:
150+
```
151+
$ vagrant ssh -c "sudo pkill -KILL -u vagrant"
152+
$ vagrant ssh -c "sudo userdel -f -r vagrant"
153+
```
154+
155+
Finally, shutdown the VM, remove the sharedfolder, and export the VM as an .ova file
156+
157+
For VirtualBox:
149158
```
150159
$ vagrant halt
151160
$ VBoxManage sharedfolder remove "Linux Developer VM" --name "vagrant"
152161
$ VBoxManage modifyvm "Linux Developer VM" --name "Linux Developer VM v0.1.0"
153162
$ VBoxManage export "Linux Developer VM v0.1.0" --output "linux-developer-vm-v0.1.0.ova" --options manifest,nomacs
154163
```
155164

165+
For VMware:
166+
```
167+
$ vagrant halt
168+
$ VMX_FILE=`cat .vagrant/machines/default/vmware_desktop/id`
169+
$ ovftool --name="Linux Developer VM v0.1.0" "$VMX_FILE" linux-developer-vm-v0.1.0.ova
170+
```
171+
156172
Don't forget to throw away the VM when you are done:
157173
```
158174
$ vagrant destroy -f
159175
```
160176

161-
162177
## Contributing
163178

164179
1. Fork the repository on Github

0 commit comments

Comments
 (0)