DevOps: Difference between revisions
No edit summary |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= General = | |||
Note: DevOps is NOT ABOUT Dockers, AWS, and other tools of DevOps. | |||
It's about controlling the processes of software engineering: https://vimeo.com/165186982 | |||
= Tools = | |||
== Distributions == | |||
[[Slackware]] | |||
== Development environment == | == Development environment == | ||
[[Docker | [[Docker]] | ||
[[Category:Development]] | [[Category:Development]] | ||
Line 11: | Line 23: | ||
''Last tested on Windows 10 Home x64 (v1511, build 10586.318) + VirtualBox v5.0.20 r106931'' | ''Last tested on Windows 10 Home x64 (v1511, build 10586.318) + VirtualBox v5.0.20 r106931'' | ||
<span class="shell"> | ''Base reference: [http://stackoverflow.com/a/19017826 Stackoverflow]'' | ||
* the name of the virtual machine is '''virtualmachine''' | |||
<span class="shell">given:</span> | |||
* the name of the virtual machine is '''virtualmachine''' Your VM name may be different. | |||
<span class="shell"> | <span class="shell">instruction:</span> | ||
We first create a batch file that runs the VM. Create a file named <span class="package">vm-run.bat</span> with the following content. | We first create a batch file that runs the VM. Create a file named <span class="package">vm-run.bat</span> with the following content. | ||
Line 32: | Line 48: | ||
Use the following line to run the VM in the background: <code>wscript vm-run.vbs</code> | Use the following line to run the VM in the background: <code>wscript vm-run.vbs</code> | ||
<span class="shell">optional:</span> | |||
<span class="shell">optional 1:</span> create a shortcut | |||
You can optionally create a shortcut on your Desktop with the following value in Target: | You can optionally create a shortcut on your Desktop with the following value in Target: | ||
Line 42: | Line 58: | ||
</source> | </source> | ||
To check if it's running, go to Task Manager (taskmgr using CLI) and check Details tab. There should be 3 instances of < | To check if it's running, go to Task Manager (taskmgr using CLI <span class="package"><span style="font-family: Wingdings">ÿ</span> + r</span>) and check Details tab. There should be 3 instances of <span class="package">VBoxHeadless.exe</span> processes running. Another way to check in CLI is to execute this line: | ||
<source lang="dosbatch"> | |||
C:\Users\JMoe>tasklist /FI "IMAGENAME eq VBoxHeadless.exe" | |||
Image Name PID Session Name Session# Mem Usage | |||
========================= ======== ================ =========== ============ | |||
VBoxHeadless.exe 7104 Console 1 2,444 K | |||
VBoxHeadless.exe 7112 Console 1 4,164 K | |||
VBoxHeadless.exe 7136 Console 1 83,596 K | |||
</source> | |||
<span class="shell">optional 2:</span> run it without logging on to the system (similar to a system service) | |||
# Open Task Scheduler | |||
# Under General tab, in security options, choose <span class="package">Run whether user is logged on or not</span> | |||
# Check <span class="package">Run with highest privileges</span> | |||
# Under Triggers tab, create a trigger and choose "At startup" for <span class="package">Begin the task</span>. Make sure <span class="package">Enabled</span> is checked | |||
# Under Actions tab, create an action and choose "Start a program" for <span class="package">Action</span>. <span class="package">Program/script:</span> should be "C:\Windows\System32\wscript.exe" and <span class="package">Add arguments (optional):</span> is set to "C:\myscripts\vm.run.vbs" |
Latest revision as of 08:35, 7 December 2019
General
Note: DevOps is NOT ABOUT Dockers, AWS, and other tools of DevOps.
It's about controlling the processes of software engineering: https://vimeo.com/165186982
Tools
Distributions
Development environment
VirtualBox
Running a VM headless (in the background, like a service) or without GUI
Last tested on Windows 10 Home x64 (v1511, build 10586.318) + VirtualBox v5.0.20 r106931
Base reference: Stackoverflow
given:
- the name of the virtual machine is virtualmachine Your VM name may be different.
instruction:
We first create a batch file that runs the VM. Create a file named vm-run.bat with the following content.
cd "c:\Program Files\Oracle\VirtualBox\"
VBoxHeadless -s virtualmachine -v on
We can just use the batch file above, however, it opens up the shell to run the batch file. We use Windows-based script host using VBS to run the file. Create a file named vm-run.vbs with the following content.
set WshShell = WScript.CreateObject("WScript.Shell")
obj = WshShell.Run("vm-run.bat",0)
set WshShell = Nothing
Use the following line to run the VM in the background: wscript vm-run.vbs
optional 1: create a shortcut
You can optionally create a shortcut on your Desktop with the following value in Target:
C:\Windows\System32\wscript.exe C:\Files\tools\vm.run.vbs
To check if it's running, go to Task Manager (taskmgr using CLI ÿ + r) and check Details tab. There should be 3 instances of VBoxHeadless.exe processes running. Another way to check in CLI is to execute this line:
C:\Users\JMoe>tasklist /FI "IMAGENAME eq VBoxHeadless.exe"
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
VBoxHeadless.exe 7104 Console 1 2,444 K
VBoxHeadless.exe 7112 Console 1 4,164 K
VBoxHeadless.exe 7136 Console 1 83,596 K
optional 2: run it without logging on to the system (similar to a system service)
- Open Task Scheduler
- Under General tab, in security options, choose Run whether user is logged on or not
- Check Run with highest privileges
- Under Triggers tab, create a trigger and choose "At startup" for Begin the task. Make sure Enabled is checked
- Under Actions tab, create an action and choose "Start a program" for Action. Program/script: should be "C:\Windows\System32\wscript.exe" and Add arguments (optional): is set to "C:\myscripts\vm.run.vbs"