-
Notifications
You must be signed in to change notification settings - Fork 2
/
ptvirtualize-incomplete-modules
executable file
·162 lines (113 loc) · 6.56 KB
/
ptvirtualize-incomplete-modules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
PTVirtualize Modules to be created
---------------------------------------
Bug
PTVirtualize destroy hooks should delete the shared folder, and it should be randomly named so we can have multiple guests
zero config connect to one host share
Bug
Check the ptvirtualize default cm log for this. it appears even though the sftp transfer worked
1NET_SFTP_STATUS_FAILURE:
BUG
Package at command line doesnt allow a user to enter multi word names interaactively. its fine as a parameter so this is parameters only for now
for the vm name use the id in between the curly brackets from vboxmanage list vms
NOTES even if a ptvirtualize user has an ssh key, we still should not delete their password as commands like shutdown pipe it
in. you can disallow password based ssh login instead if needed
1) Need to add the ability to fire up multiple boxes in multiple projects, so we generate the box name to ptvirtualize-box-{$dirname}
Then we still get our default single box, and can have more than one in a phlangrantfile (as opposed to multiple ptvirtualizefiles)?
or do we want multiple?
2) need to add a destroy hook that run uninstall provisioners, ie remove host file entry
DONE
3) set correct share folder, not /var/www. I think this needs to be in cleofy, so it cant be a generic auto anymore
it only has one qustion in cleo "share_directory" which is /var/www/pharaoh-tools
DONE
4) get provisioners to check papyrusfilelocal first
5) allow a flag to delete bash history when running shell with piped sudo password
6) PTVirtualize Hooks. So, we have our PTVirtualizefile, which specifies provisioners. We can also leave autopilot files
in a named directory structure :
getcwd()."/build/config/ptvirtualize/hooks/$provisioner/$tool/$hook/$target/$type"
$provisioner = "PharaohTools"
$tool = "ptconfigure" || "ptdeploy"
$hook = "up"
$target = "guest"
$type = "post"
ptvirtualize command list
-------------------------
ssh-config outputs OpenSSH valid configuration to connect to the machine
- get machine connect details from papyrus-local (papyrus commit/push papyrus-local dont)
- display the details
- 1 day
DO AN ENV-CONFIG LIST LOCAL
package packages a running vagrant environment into a box
THIS WILL BECOME BOX PACKAGE
DONE
------------------
ssh DONE auto-ssh cli
connects to machine via SSH
invoke ssh using the ssh params configured during ptvirtualize up and put into local-papyrus
- get machine connect details from papyrus-local (papyrus commit/push papyrus-local dont)
- get id from name
- invokessh with these details
- 1/2 days
box DONE box add, box remove
add - manages boxes: installation, removal, etc. download/install/remove a base box
provision DONE ptvirtualize provision now
now -provisions the vagrant machine, install pharaoh and execute pharaoh autopilots
reload DONE ptvirtualize up reload
restarts vagrant machine, loads new Vagrantfile configuration
status DONE ptvirtualize status full, show
ptvirtualize status full outputs status of the vagrant machine
ptvirtualize status show outputs status of the vagrant machine
destroy DONE ptvirtualize destroy now
ptvirtualize destroy now, stops and deletes all traces of the vagrant machine
halt DONE stops the vagrant machine
ptvirtualize halt hard, stops with hard power button
ptvirtualize halt now, stops with ssh shutdown, then soft power button, then hard power button
help DONE shows the help for a subcommand
ptvirtualize *MODULE* help
init DONE is flirt (or init works too, if you must)
ptvirtualize flirt now initializes a new Vagrant environment by creating a Vagrantfile
resume DONE ptvirtualize resume now
ptvirtualize resume now, resume a suspended vagrant machine, resume the box described in papyruslocal
suspend DONE - THIS IS NOW HALT SUSPEND/PAUSE
ptvirtualize halt suspend, suspends the machine
ptvirtualize halt pause, suspends the machine
up DONE -
ptvirtualize up now --modify --provision, starts, modifies hardware of and provisions the vagrant environment
STUFF TO DOCUMENT
------------------------------------------------------------------------------
Concepts
PTVirtualizefile
This file describes how PTVirtualize will set up your Virtual Machine. PTVirtualizefiles all extend the base
PTVirtualizefileBase Model, in the PTVirtualizeRequired Module complete. This base model provides groups of
default settings for your Virtual Machines. You
Networking
Basic Usage
Forwarded Ports
Private Network
Public Network
Synced Folders
Providers
I've *mostly* built in readiness for other providers, need to put vboxmange commands through a wrapper class of
of methods.Make all calls to vboxmange shell commands into calls to a wrapper, so that we can use other providers.
VirtualBox - This comes with using the vboxmanage wrapper commands already used.
VMware - Contact VMWare and ask them to write their own one? After above wrapper is made
Plugins
The software is built on the Pyramid framework as are all Pharaoh tools, and extensions are written and provided
through Pyramid modules. Click here for more information on Pyramid module development in general.
Command-Line Interface
------------------------------------------------------------------------------
PTVirtualize is (believe it or not) based heavily on ideas made famous in the Ruby tool Vagrant.
PTVirtualize is primarily a command line tool, is done through the command-line interface.
The interface is available using the ptvirtualize command, and comes installed with Vagrant automatically. The ptvirtualize
command in turn has many subcommands, such as ptvirtualize up, ptvirtualize destroy, etc.
As with all Pharaoh Tools, running the command with no modules, parameters or actions will display a list, help
will be displayed showing all available subcommands.
Further, you can run any PTVirtualize module with the help action to output help about that module. For example,
try running ptvirtualize init -h. The help will output a one
sentence synopsis of what the command does as well as a list of all the flags the command accepts. In depth
documentation and use cases of various Vagrant commands is available by reading the appropriate sub-section available
in the left navigational area of this site.
Prerequisites:
We must have an SSH Client installed on the Original Box.
We must have at least one user with sudo capability (root if you absolutely must) on the Original Box.
Currently we need to have Virtualbox Guest Additions installed on the Image
------------------------------------------------------------------------------