├── labbuildr ├── Readme1st.txt ├── defaults.json.example ├── changes.txt ├── deletefiles.txt ├── update.ps1 ├── docker_env.ps1 ├── template │ ├── WS_1709.template │ ├── WS_Preview_RS4.template │ ├── WS_Preview_17035.template │ ├── ScaleIOVM_2nics.template │ ├── UnityVSA.template │ ├── Nested_ESXi6.5U1_Appliance_Template_v1.0.template │ ├── Nested_ESXi6.5d_Appliance_Template_v1.0.template │ └── Nested_ESXi6.0u3_Appliance_Template_v1.0.template ├── profile.ps1 ├── install-ansible.ps1 ├── install-aptcache.ps1 ├── install-geonas.ps1 ├── install-vcsa.ps1 ├── install-photonos.ps1 ├── install-esxiova.ps1 ├── install-centos.ps1 └── install-coreos.ps1 ├── docs ├── Solutionpacks │ ├── install-ansible.ps1.md │ ├── install-hadoop.ps1.md │ ├── install-esxi.ps1.md │ ├── install-VCSA.ps1.md │ ├── install-ubuntu.ps1.md │ ├── install-esxiova.ps1.md │ ├── install-nve.ps1.md │ ├── install-scaleiosvm.ps1.md │ ├── install-ecs3.ps1.md │ ├── install-ecs.ps1.md │ ├── install-centos.ps1.md │ ├── install-coprhd.ps1.md │ ├── install-cloudboost.ps1.md │ ├── install-mesos.ps1-with-rexray.md │ ├── install-unity-falcon.ps1.md │ ├── install-centos4viprsrm.md │ ├── install-cloudarray.ps1.md │ ├── ubuntu-bakery.ps1.md │ └── install-unity.ps1.md ├── Scenarios │ ├── exchange_noip_networker.md │ ├── Install labbuildr on linux.md │ ├── Build A Domain Controller.md │ ├── networker_betas.md │ └── SCOM_ESI_Options.md ├── appendix │ ├── helpful_commands.md │ ├── unity.md │ ├── the_backup_bear_lab.md │ ├── SCVMM_1711_S2D_2016_1711.md │ ├── master_table.md │ ├── multi-host.md │ ├── networker_cloudboost.md │ ├── Creating_a_Windows_Master.md │ └── common_docker_registry.md ├── index.md ├── labbuildr on linux and osx.md └── student_guide.md ├── profile.ps1 ├── header-mkdocs.yml ├── .gitattributes ├── README.md └── .gitignore /labbuildr/Readme1st.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bottkars/labbuildr/HEAD/labbuildr/Readme1st.txt -------------------------------------------------------------------------------- /labbuildr/defaults.json.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bottkars/labbuildr/HEAD/labbuildr/defaults.json.example -------------------------------------------------------------------------------- /docs/Solutionpacks/install-ansible.ps1.md: -------------------------------------------------------------------------------- 1 | tbd 2 | 3 | ## install-ansible installs a Standard ansible host on CentOS7 -------------------------------------------------------------------------------- /labbuildr/changes.txt: -------------------------------------------------------------------------------- 1 | changes: 2 | changes will be posted on #labbuildr #slack channel (http://codecommunity.emccode.com) -------------------------------------------------------------------------------- /docs/Scenarios/exchange_noip_networker.md: -------------------------------------------------------------------------------- 1 | # Using labbuildr to create a DAG without Administrative Access Point ( and integrate Networker ) 2 | -------------------------------------------------------------------------------- /docs/appendix/helpful_commands.md: -------------------------------------------------------------------------------- 1 | ## helpful commands 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/appendix/unity.md: -------------------------------------------------------------------------------- 1 | 2 | Install a Unity all in Falcon or greater 3 | 4 | -------------------------------------------------------------------------------- /profile.ps1: -------------------------------------------------------------------------------- 1 | Write-Warning "you reached emergency update mode, patching to new labbuildr Distro Version" 2 | $Filecopy = Copy-Item ./labbuildr/build-lab.ps1 -Force -Destination ./build-lab.ps1 -ErrorAction SilentlyContinue 3 | ./build-lab.ps1 -update -Force 4 | -------------------------------------------------------------------------------- /docs/Scenarios/Install labbuildr on linux.md: -------------------------------------------------------------------------------- 1 | labbuildr on linux can be installed using from PSGallery powershell install-script method 2 | 3 | ```Powershell 4 | install-script install-labbuildr 5 | install-labbuildr.ps1 6 | ``` 7 | 8 | see this video for details [video](https://youtu.be/Dtv3XCUuOgs) -------------------------------------------------------------------------------- /header-mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: labbuildr Documentation 2 | repo_url: https://github.com/bottkars/labbuildr 3 | site_author: Karsten Bott 4 | theme: readthedocs 5 | 6 | copyright: "labbuildr 7 | is licensed under the MIT license" 8 | pages: 9 | - Home: index.md 10 | - Installation: installation.md 11 | # - Examples: Examples.md 12 | - Solutionpacks: 13 | - Scenarios: 14 | -------------------------------------------------------------------------------- /docs/appendix/the_backup_bear_lab.md: -------------------------------------------------------------------------------- 1 | ## this one goes to my friend preston, aka @backupbear 2 | 3 | 4 | ## install labbuildr and create a sql lab ... 5 | 6 | 7 | ![image](https://user-images.githubusercontent.com/8255007/28201487-8ccbc5e2-6871-11e7-9b0e-8258b1a7c9dd.png) 8 | ![image](https://user-images.githubusercontent.com/8255007/28201491-9095f0bc-6871-11e7-8136-c5047fa0d8e5.png) 9 | ![image](https://user-images.githubusercontent.com/8255007/28201497-966758e6-6871-11e7-9016-9dbb98c64039.png) 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /labbuildr/deletefiles.txt: -------------------------------------------------------------------------------- 1 | ./scaleio.ps1 2 | ./viprmaster/viprmaster.ovf 3 | ./Disks 4 | ./labbuildr.ps1 5 | ./helper 6 | ./viprmaster 7 | ./import-viprova.ps1 8 | ./install-scaleio.ps1 9 | ./get-*.ps1 10 | ./install-isi8.ps1 11 | ./install-rdostack.ps1 12 | ./Install/ 13 | ./install-isi.ps1 14 | ./install-ave73.ps1 15 | ./install-mesosdev.ps1 16 | ./install-centos4scaleio.ps1 17 | ./start-scenario.ps1 18 | ./*-scenario.ps1 19 | ./Scripts 20 | ./install-dockerhost.ps1 21 | ./deletefiles.txt 22 | ./SIOToolkit 23 | ./install-openstack.ps1 24 | ./labbuildr/ 25 | ./defaults.xml 26 | ./defaults.xml.example 27 | ./template/*.vmx -------------------------------------------------------------------------------- /docs/Scenarios/Build A Domain Controller.md: -------------------------------------------------------------------------------- 1 | ## This guide describes how to build a Domaincontroller with labbuildr 2 | 3 | ```Powershell 4 | .\build-lab.ps1 [-DConly] [-defaults] [-Toolsupdate] [-Master ] [-Masterpath ] [-Gateway] [-VMnet 5 | ] [-Size ] [-BuildDomain ] [-NW] [-nw_ver ] [-NoDomainCheck] [-MySubnet ] [-AddressFamily 6 | ] [-IPV6Prefix ] [-IPv6PrefixLength ] [-Sourcedir ] [-USE_SOURCES_ON_SMB] [-WhatIf] [-Confirm] 7 | [] 8 | ``` 9 | 10 | 11 | The easiest way to install a domaincontroller is by running 12 | ```Powershell 13 | ./build-lab.ps1 -DConly 14 | ``` 15 | All required Parameters for networking will be taken from labdefaults 16 | 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | # * text=auto 3 | *.txt text eol=crlf 4 | *.ps1 text eol=crlf 5 | *.psm1 text eol=crlf 6 | *.psd1 text eol=crlf 7 | *.cmd text eol=crlf 8 | *.md text eol=crlf 9 | *.xml text merge=union 10 | 11 | # labbuildr.ps1 text eol=crlf 12 | 13 | # Custom for Visual Studio 14 | *.cs diff=csharp 15 | *.sln merge=union 16 | *.csproj merge=union 17 | *.vbproj merge=union 18 | *.fsproj merge=union 19 | *.dbproj merge=union 20 | 21 | # Standard to msysgit 22 | *.doc diff=astextplain 23 | *.DOC diff=astextplain 24 | *.docx diff=astextplain 25 | *.DOCX diff=astextplain 26 | *.dot diff=astextplain 27 | *.DOT diff=astextplain 28 | *.pdf diff=astextplain 29 | *.PDF diff=astextplain 30 | *.rtf diff=astextplain 31 | *.RTF diff=astextplain 32 | -------------------------------------------------------------------------------- /docs/appendix/SCVMM_1711_S2D_2016_1711.md: -------------------------------------------------------------------------------- 1 | ## deploying a 2-Node S2D Spaces with Hyper-V, SCVMM 1711 and SQL2016 fully automated 2 | just issue line below and be patient as downloads may take time :-) 3 | 4 | 5 | ```Powershell 6 | .\build-lab.ps1 -HyperV -HyperVNodes 2 -SpacesDirect -SC_Version SC1711 -SCVMM -ConfigureVMM -Master 2016_1711 -ConfigureVMM 7 | ``` 8 | 9 | ![image](https://user-images.githubusercontent.com/8255007/32717986-efe6a6d4-c85b-11e7-8174-e8bd2cd5c560.png) 10 | 11 | ![image](https://user-images.githubusercontent.com/8255007/32717859-80d0149c-c85b-11e7-8fde-1b41bf2d76f2.png) 12 | 13 | 14 | ## Adding Honolulu to Hyper-V Scenario 15 | ```Powershell 16 | .\build-lab.ps1 -HyperV -HyperVNodes 2 -SpacesDirect -SC_Version SC1711 -SCVMM -ConfigureVMM -Master 2016_1711 -honolulu 17 | ``` 18 | This adds Honolulu to port 8088 on HV1Node1 (.151) -------------------------------------------------------------------------------- /labbuildr/update.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding( 2 | SupportsShouldProcess=$true, 3 | ConfirmImpact="Medium")] 4 | Param( 5 | [Parameter(Mandatory = $false)] 6 | [ValidateSet('master','develop')] 7 | $branch = 'master' 8 | ) 9 | 10 | if (git) 11 | { 12 | $Git_Dir = Split-Path (Get-Location) 13 | Write-Host -ForegroundColor Gray " ==> git installed, running update" 14 | $Repos = ('/labbuildr','/labbuildr/labbuildr-scripts','/labbuildr/vmxtoolkit','/labbuildr/labtools') 15 | foreach ($Repo in $Repos) 16 | { 17 | Write-Host -ForegroundColor Gray " ==>Checking for Update on $Repo" 18 | git -C $Git_Dir/$Repo pull 19 | Write-Host -ForegroundColor Gray " ==>Checking out $btanch for $Repo" 20 | git -C $Git_Dir/$Repo checkout $branch 21 | } 22 | Import-Module $Git_Dir/labbuildr/vmxtoolkit -ArgumentList "$HOME/labbuildr/" -Force 23 | Import-Module $Git_Dir/labbuildr/labtools -Force 24 | Invoke-Expression "./profile.ps1" 25 | } 26 | else 27 | { 28 | Write-Host -ForegroundColor Yellow " ==>Sorry, you need git to run Update" 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-hadoop.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-hadoop 2 | 3 | install-haddop installs a default hadoop setup in your vmware workstation, based upon centos7 4 | to start the installation, simply run 5 | ```Powershell 6 | .\install-hadoop.ps1 -Defaults 7 | ``` 8 | if no operating system master for centos is found, it will be downloaded automatically from labbuildr repo on azure. 9 | haddop will be loaded from the hadoop repo with the latest/specified version 10 | once the linked clone is created, the basic node configuration is started 11 | ![image](https://cloud.githubusercontent.com/assets/8255007/17024223/6236d166-4f57-11e6-8900-bbd89493784d.png) 12 | once the node setup is complete, the hadoop configuration starts 13 | ![image](https://cloud.githubusercontent.com/assets/8255007/17024795/854fecee-4f59-11e6-9602-772cd8f3c53a.png) 14 | connect to the ressourcemanager ui: 15 | ![image](https://cloud.githubusercontent.com/assets/8255007/17024147/0b528cf0-4f57-11e6-8247-bf0e1f5702f7.png) 16 | or to the namenode: 17 | ![image](https://cloud.githubusercontent.com/assets/8255007/17024424/233c7316-4f58-11e6-86a0-6b9b57a20e5c.png) 18 | -------------------------------------------------------------------------------- /docs/Scenarios/networker_betas.md: -------------------------------------------------------------------------------- 1 | # how to run networker beta software 2 | 3 | labbuildr allows for unknown Networker Versions 4 | Therefore, simply extract your binaries to the _nwunknown_ folder: 5 | 6 | # update to latest labbuildr 7 | 8 | ```Pofwershell 9 | ./build-lab.ps1 -update -branch develop 10 | ./build-lab.ps1 11 | ``` 12 | ## This Example will install a Beta Version of Networker on a 2016core: 13 | ( replace Destination with your sourcedir /Networker/nwunknown) 14 | 15 | 16 | ``` 17 | # Expand the software 18 | Expand-LABpackage -Archive /home/bottk/Downloads/nw_win_x64.zip -destination /home/bottk/Sources.labbuildr/Networker/nwunknown/ 19 | # Build NW Server on Server 2016 Core 20 | ./build-lab.ps1 -NWServer -defaults -nw_ver nwunknown -Master 2016core 21 | ``` 22 | 23 | ## this example builds a Exchange 2016 Server (single Node) with a NMM Beta Version: 24 | 25 | ``` 26 | # Extract the package to nmmunknown 27 | Expand-LABpackage -Archive /home/bottk/Downloads/nmm_win_x64.zip -destination /home/bottk/Sources.labbuildr/Networker/nmmunknown/ 28 | # Run Exchange Setup 29 | /build-lab.ps1 -Exchange2016 -nmm -nmm_ver nmmunknown -nw_ver nwunknown -DAG -EXNodes 1 -Master 2016 30 | ``` -------------------------------------------------------------------------------- /docs/Solutionpacks/install-esxi.ps1.md: -------------------------------------------------------------------------------- 1 | ## about install-esxi.ps1 2 | insatll-esxi.ps1 installs e ESXi (6) Server in labbuildr 3 | the Installation uses a customized ISO for kickstarting 4 | the iso is downloaded automatically 5 | ![esxi_installer](https://cloud.githubusercontent.com/assets/8255007/17742389/1fe0122e-64a0-11e6-8ef8-1550390a6d21.gif) 6 | 7 | to run the installer, simply run 8 | 9 | ```Powershell 10 | .\install-esxi.ps1 -Defaults -esxi_ver '6.0.0.update02' 11 | ``` 12 | 13 | if you want to try the esxui fling, use 14 | 15 | ```Powershell 16 | .\install-esxi.ps1 -Defaults -esxi_ver '6.0.0.update02' -esxui 17 | ``` 18 | ## prebuilt nfs 19 | you can prepare your labbuildr dcnode for serving nfs 20 | just execute .\dcnode\configure-nfs.ps1 from the labbuildr Shell on dcnode 21 | all required roles will be installed and a nfs share will be created 22 | if you then call the installer with 23 | ```Powershell 24 | .\install-esxi.ps1 -Defaults -esxi_ver '6.0.0.update02' -esxui -nfs 25 | ``` 26 | the SWDEPOT NFS Datastore will be available 27 | 28 | ![image](https://cloud.githubusercontent.com/assets/8255007/17742365/07d820f4-64a0-11e6-86a6-fcdc43a2bac6.png) 29 | ##versions 30 | currently, '6.0.0.update02' and '6.0.0.update01' ISO´s are available, patch Levels are in the work -------------------------------------------------------------------------------- /docs/appendix/master_table.md: -------------------------------------------------------------------------------- 1 | Available Windows Master: 2 | 'WS_1709','WS_Preview_RS4', 3 | '2016core_1801','2016_1801','2016_1711','2016core_1711','2016','2016core',# 4 | '2012R2_Ger','2012_R2','2012R2FallUpdate','2012R2Fall_Ger', 5 | '2012_Ger','2012' 6 | 7 | 8 | | Server 2012R2 | OS Version |release | Comment | 9 | |---------------|----------------------------|----------------------------|---------------------| 10 | |2012R2FallUpdate|OS Version 6.3.9600.17196 |(winblue_gdr.140601-1505)|re-imaged| 11 | 12 | 13 | | Server 2016 | OS Version |release | Comment | 14 | |---------------|----------------------------|----------------------------|---------------------| 15 | |2016|||original RTM| 16 | |2016_1705|OS Version: 10.0.14393.0|(rs1_release.160915-0644)|(refresh image only)| 17 | |2016_1711|OS Version: 10.0.14393.1378|(rs1_release.170620-2008)|re-imaged| 18 | 19 | 20 | |Server 2016core | OS Version|release |Comment| 21 | |---------------|----------------------------|----------------------------|---------------------| 22 | |2016core|||original RTM| 23 | |2016core_1705|OS Version: 10.0.14393.0|(rs1_release.160915-0644)|(refresh image only)| 24 | |2016core_1711|OS Version: 10.0.14393.1378|(rs1_release.170620-2008)|re-imaged| 25 | 26 | 27 | Windows Server|OS Version|release |Comment| 28 | |---------------|----------------------------|----------------------------|---------------------| 29 | WS_1709| 10.0.16299.15 |(WinBuild.160101.0800)|private build| 30 | WS_PREVIEW_RS4|10.0.16278.1000 | (WinBuild.160101.0800)| -------------------------------------------------------------------------------- /labbuildr/docker_env.ps1: -------------------------------------------------------------------------------- 1 | param ( 2 | [ValidateSet( 3 | 'beta','stable' 4 | )] 5 | [string]$branch="stable" 6 | ) 7 | 8 | if (($env:Path) -notmatch ("/docker")) 9 | { 10 | Write-Host "Adjusting Path" 11 | $env:Path="$env:Path;$PSScriptRoot/docker" 12 | } 13 | if (!(Test-Path "$PSScriptRoot/docker/docker-machine-driver-vmwareworkstation.exe")) 14 | { 15 | Write-Warning "Docker Tools for labbuildr not installed, trying to install" 16 | $Destination = (Get-LABDefaults).sourcedir 17 | Receive-LABDocker -install -Install_Dir $PSScriptRoot -Destination $labdefaults.sourcedir -branch $branch 18 | #break 19 | } 20 | 21 | write-host -ForegroundColor Yellow ' 22 | ## . 23 | ## ## ## == 24 | ## ## ## ## ## === 25 | /"""""""""""""""""\___/ === 26 | ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ 27 | \______ o __/ 28 | \ \ __/ 29 | \____\_______/ 30 | 31 | ' 32 | Write-Host "Welcome to labbuildr Boot2Docker Environment 33 | you are running on VMware $vmxtoolkit_type $($vmwareversion.ToString()) " 34 | Write-Host -ForegroundColor White "Active Docker-Machine Hosts:" 35 | docker-machine ls 36 | write-host " 37 | create a docker 'test' machine: 38 | docker-machine create test --driver vmwareworkstation 39 | 40 | To run a ubuntu container on 'test' 41 | docker-machine env test | Invoke-Expression 42 | docker run -it ubuntu 43 | 44 | To remove all docker machines, run: 45 | docker-machine ls -q | foreach { docker-machine rm $_}" 46 | -------------------------------------------------------------------------------- /docs/appendix/multi-host.md: -------------------------------------------------------------------------------- 1 | # multi-host configurations 2 | labbuildr allows for multi-host configurations. to be able to connect virtual machines on different hosts via network, 3 | the use of vlan´s is required. 4 | 5 | a standard, distributed labs use 802.1Q VLANS. 6 | I recommend TPLink or Netgear SoHo switches ( EG, TP-Link TL-SG108, Netgear GS-108GE, TP-Link Archer C7 w. OpenWRTR ) 7 | Therefore, some requirements ion the hosts must be met: 8 | * For Windows Hosts, it is best using Intel ANS Drivers with VLAN SUpport ( Attention, on Windows 10 only Anniversary Update currently ! ) 9 | * For Linux, use default VLAN SUpport ( Ubuntu witr Netrwork Manager ) 10 | ![image](https://cloud.githubusercontent.com/assets/8255007/25733949/823da6ee-315e-11e7-90dd-79f6a9f8fd10.png) 11 | * For OSX, Default VLAN COnfig. 12 | 13 | 14 | Internet Connection is done Via OpenWRT ( Physically or VM ) 15 | 16 | 17 | # Example 1 18 | In This Example, i create a VLAN VLAN3 , and the Virtual machine should use VMnet3. 19 | The Subnet to be used is 10.10.3.0 20 | OpenWRT runs as a VM on Host1 21 | 22 | ## On All Hosts 23 | use the vmware-netcfg tool to configure a bridged vmnet3 pointing to vlan3 24 | this requires that autobridging is enable for vmnet0 25 | ![image](https://cloud.githubusercontent.com/assets/8255007/25733995/03f31fca-315f-11e7-9b71-118559e13098.png) 26 | 27 | 28 | 29 | ## on Host1 30 | ```Powershell 31 | Set-LABsubnet -subnet 10.10.3.0 32 | Set-LABDNS -DNS1 10.10.3.10 -DNS2 10.10.3.4 33 | Set-LABvmnet vmnet3 34 | Set-LabDefaultGateway 10.0.3.4 35 | ``` 36 | 37 | 38 | 39 | ## Switch Config Example TP-Link 40 | 41 | 42 | ![image](https://cloud.githubusercontent.com/assets/8255007/25733925/4c579300-315e-11e7-943d-d98a4c65cba2.png) 43 | -------------------------------------------------------------------------------- /labbuildr/template/WS_1709.template: -------------------------------------------------------------------------------- 1 | .encoding = "windows-1252" 2 | config.version = "8" 3 | virtualHW.version = "11" 4 | numvcpus = "2" 5 | vcpu.hotadd = "TRUE" 6 | scsi0.present = "TRUE" 7 | scsi0.virtualDev = "lsisas1068" 8 | sata0.present = "TRUE" 9 | memsize = "2048" 10 | mem.hotadd = "TRUE" 11 | usb.present = "TRUE" 12 | ehci.present = "TRUE" 13 | ehci.pciSlotNumber = "33" 14 | usb_xhci.present = "TRUE" 15 | serial0.present = "TRUE" 16 | serial0.fileType = "thinprint" 17 | pciBridge0.present = "TRUE" 18 | pciBridge4.present = "TRUE" 19 | pciBridge4.virtualDev = "pcieRootPort" 20 | pciBridge4.functions = "8" 21 | pciBridge5.present = "TRUE" 22 | pciBridge5.virtualDev = "pcieRootPort" 23 | pciBridge5.functions = "8" 24 | pciBridge6.present = "TRUE" 25 | pciBridge6.virtualDev = "pcieRootPort" 26 | pciBridge6.functions = "8" 27 | pciBridge7.present = "TRUE" 28 | pciBridge7.virtualDev = "pcieRootPort" 29 | pciBridge7.functions = "8" 30 | vmci0.present = "TRUE" 31 | hpet0.present = "TRUE" 32 | virtualHW.productCompatibility = "hosted" 33 | powerType.powerOff = "soft" 34 | powerType.powerOn = "soft" 35 | powerType.suspend = "soft" 36 | powerType.reset = "soft" 37 | floppy0.present = "FALSE" 38 | tools.remindInstall = "FALSE" 39 | nvram = "WS_1709.nvram" 40 | firmware = "efi" 41 | guestos = "windows9srv-64" 42 | scsi0:0.present = "TRUE" 43 | scsi0:0.deviceType = "disk" 44 | scsi0:0.fileName = "disk0.vmdk" 45 | scsi0:0.mode = "persistent" 46 | scsi0:0.writeThrough = "false" 47 | scsi0:0.virtualSSD = "1" 48 | sata0:1.present = "TRUE" 49 | sata0:1.autodetect = "false" 50 | sata0:1.deviceType = "cdrom-raw" 51 | sata0:1.startConnected = "TRUE" 52 | sata0:1.fileName = "false" 53 | ethernet0.present = "TRUE" 54 | ethernet0.connectionType = "bridged" 55 | ethernet0.wakeOnPcktRcv = "FALSE" 56 | ethernet0.pciSlotNumber = "192" 57 | ethernet0.virtualDev = "vmxnet3" 58 | tools.upgrade.policy = "useGlobal" 59 | scsi0:0.redo = "" 60 | pciBridge0.pciSlotNumber = "17" 61 | pciBridge4.pciSlotNumber = "21" 62 | pciBridge5.pciSlotNumber = "22" 63 | pciBridge6.pciSlotNumber = "23" 64 | pciBridge7.pciSlotNumber = "24" 65 | scsi0.pciSlotNumber = "160" -------------------------------------------------------------------------------- /labbuildr/template/WS_Preview_RS4.template: -------------------------------------------------------------------------------- 1 | .encoding = "windows-1252" 2 | config.version = "8" 3 | virtualHW.version = "11" 4 | numvcpus = "2" 5 | vcpu.hotadd = "TRUE" 6 | scsi0.present = "TRUE" 7 | scsi0.virtualDev = "lsisas1068" 8 | sata0.present = "TRUE" 9 | memsize = "2048" 10 | mem.hotadd = "TRUE" 11 | usb.present = "TRUE" 12 | ehci.present = "TRUE" 13 | ehci.pciSlotNumber = "33" 14 | usb_xhci.present = "TRUE" 15 | serial0.present = "TRUE" 16 | serial0.fileType = "thinprint" 17 | pciBridge0.present = "TRUE" 18 | pciBridge4.present = "TRUE" 19 | pciBridge4.virtualDev = "pcieRootPort" 20 | pciBridge4.functions = "8" 21 | pciBridge5.present = "TRUE" 22 | pciBridge5.virtualDev = "pcieRootPort" 23 | pciBridge5.functions = "8" 24 | pciBridge6.present = "TRUE" 25 | pciBridge6.virtualDev = "pcieRootPort" 26 | pciBridge6.functions = "8" 27 | pciBridge7.present = "TRUE" 28 | pciBridge7.virtualDev = "pcieRootPort" 29 | pciBridge7.functions = "8" 30 | vmci0.present = "TRUE" 31 | hpet0.present = "TRUE" 32 | virtualHW.productCompatibility = "hosted" 33 | powerType.powerOff = "soft" 34 | powerType.powerOn = "soft" 35 | powerType.suspend = "soft" 36 | powerType.reset = "soft" 37 | floppy0.present = "FALSE" 38 | tools.remindInstall = "FALSE" 39 | nvram = "WS_1709.nvram" 40 | firmware = "efi" 41 | guestos = "windows9srv-64" 42 | scsi0:0.present = "TRUE" 43 | scsi0:0.deviceType = "disk" 44 | scsi0:0.fileName = "disk0.vmdk" 45 | scsi0:0.mode = "persistent" 46 | scsi0:0.writeThrough = "false" 47 | scsi0:0.virtualSSD = "1" 48 | sata0:1.present = "TRUE" 49 | sata0:1.autodetect = "false" 50 | sata0:1.deviceType = "cdrom-raw" 51 | sata0:1.startConnected = "TRUE" 52 | sata0:1.fileName = "false" 53 | ethernet0.present = "TRUE" 54 | ethernet0.connectionType = "bridged" 55 | ethernet0.wakeOnPcktRcv = "FALSE" 56 | ethernet0.pciSlotNumber = "192" 57 | ethernet0.virtualDev = "vmxnet3" 58 | tools.upgrade.policy = "useGlobal" 59 | scsi0:0.redo = "" 60 | pciBridge0.pciSlotNumber = "17" 61 | pciBridge4.pciSlotNumber = "21" 62 | pciBridge5.pciSlotNumber = "22" 63 | pciBridge6.pciSlotNumber = "23" 64 | pciBridge7.pciSlotNumber = "24" 65 | scsi0.pciSlotNumber = "160" -------------------------------------------------------------------------------- /labbuildr/template/WS_Preview_17035.template: -------------------------------------------------------------------------------- 1 | .encoding = "windows-1252" 2 | config.version = "8" 3 | virtualHW.version = "11" 4 | numvcpus = "2" 5 | vcpu.hotadd = "TRUE" 6 | scsi0.present = "TRUE" 7 | scsi0.virtualDev = "lsisas1068" 8 | sata0.present = "TRUE" 9 | memsize = "2048" 10 | mem.hotadd = "TRUE" 11 | usb.present = "TRUE" 12 | ehci.present = "TRUE" 13 | ehci.pciSlotNumber = "33" 14 | usb_xhci.present = "TRUE" 15 | serial0.present = "TRUE" 16 | serial0.fileType = "thinprint" 17 | pciBridge0.present = "TRUE" 18 | pciBridge4.present = "TRUE" 19 | pciBridge4.virtualDev = "pcieRootPort" 20 | pciBridge4.functions = "8" 21 | pciBridge5.present = "TRUE" 22 | pciBridge5.virtualDev = "pcieRootPort" 23 | pciBridge5.functions = "8" 24 | pciBridge6.present = "TRUE" 25 | pciBridge6.virtualDev = "pcieRootPort" 26 | pciBridge6.functions = "8" 27 | pciBridge7.present = "TRUE" 28 | pciBridge7.virtualDev = "pcieRootPort" 29 | pciBridge7.functions = "8" 30 | vmci0.present = "TRUE" 31 | hpet0.present = "TRUE" 32 | virtualHW.productCompatibility = "hosted" 33 | powerType.powerOff = "soft" 34 | powerType.powerOn = "soft" 35 | powerType.suspend = "soft" 36 | powerType.reset = "soft" 37 | floppy0.present = "FALSE" 38 | tools.remindInstall = "FALSE" 39 | nvram = "WS_1709.nvram" 40 | firmware = "efi" 41 | guestos = "windows9srv-64" 42 | scsi0:0.present = "TRUE" 43 | scsi0:0.deviceType = "disk" 44 | scsi0:0.fileName = "disk0.vmdk" 45 | scsi0:0.mode = "persistent" 46 | scsi0:0.writeThrough = "false" 47 | scsi0:0.virtualSSD = "1" 48 | sata0:1.present = "TRUE" 49 | sata0:1.autodetect = "false" 50 | sata0:1.deviceType = "cdrom-raw" 51 | sata0:1.startConnected = "TRUE" 52 | sata0:1.fileName = "false" 53 | ethernet0.present = "TRUE" 54 | ethernet0.connectionType = "bridged" 55 | ethernet0.wakeOnPcktRcv = "FALSE" 56 | ethernet0.pciSlotNumber = "192" 57 | ethernet0.virtualDev = "vmxnet3" 58 | tools.upgrade.policy = "useGlobal" 59 | scsi0:0.redo = "" 60 | pciBridge0.pciSlotNumber = "17" 61 | pciBridge4.pciSlotNumber = "21" 62 | pciBridge5.pciSlotNumber = "22" 63 | pciBridge6.pciSlotNumber = "23" 64 | pciBridge7.pciSlotNumber = "24" 65 | scsi0.pciSlotNumber = "160" 66 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-VCSA.ps1.md: -------------------------------------------------------------------------------- 1 | ##about 2 | intsall-vcsa will install a vCenter Server Virtual Appliance on VMware Workstation. 3 | It will utilize labbuildr dfault vlues to integrate into your Environment. 4 | It is a 2 Step process: 5 | * Import the OVA from Template to create a Master 6 | * Create a VCSA Appliance from Master 7 | 8 | ##Import the OVA 9 | Prior Import, you Need to download the [VCSA Appliance ISO from VMware](https://my.vmware.com/de/web/vmware/details?productId=491&downloadGroup=VC60U2) ( Login required ) 10 | once downloaded, extract the VMware-vcsa file and save it with Extension.ova 11 | ![image](https://cloud.githubusercontent.com/assets/8255007/17770991/12cda41a-6541-11e6-81df-97c0b676c564.png) 12 | run 13 | ```Powershell 14 | .\install-vcsa.ps1 -ovf C:\Sources\vmware-vcsa.ova 15 | ``` 16 | ![import-vcsa](https://cloud.githubusercontent.com/assets/8255007/17772123/4856fc7a-6547-11e6-8c5c-4a83c980e9b2.gif) 17 | 18 | ##Install VCSA Node 19 | ```Powershell 20 | .\install-vcsa.ps1 -Masterpath c:\SharedMaster -Mastername vmware-vcsa 21 | ``` 22 | ![install-vcsa](https://cloud.githubusercontent.com/assets/8255007/17772592/f324f6f0-6549-11e6-80e7-b06656f82c5f.gif) 23 | once installed, give it 10 minutes to configure / warm up. 24 | the systgem is ready once you see the Login Screen 25 | ![image](https://cloud.githubusercontent.com/assets/8255007/17772660/4fe21a44-654a-11e6-997d-cf2d23ac209a.png) 26 | you can no browse to the welcome page 27 | ##Welcome Page 28 | ![image](https://cloud.githubusercontent.com/assets/8255007/17772700/94d9f41e-654a-11e6-9184-e6f1f0476f99.png) 29 | 30 | 31 | ##Login page 32 | Connect to the System using the proposed credentials: Username "Administrator@labbuildr.vmware.local" Password "Password123!" 33 | 34 | ![image](https://cloud.githubusercontent.com/assets/8255007/17772719/b068c746-654a-11e6-8f77-8bb672a8b998.png) 35 | You may now customize your Vcenter for your needs 36 | 37 | ![image](https://cloud.githubusercontent.com/assets/8255007/17770692/69625b42-653f-11e6-84ee-679982517342.png) 38 | 39 | Special thanks to @liamw for his awesoome work. 40 | See http://www.virtuallyghetto.com/ for all his stuff on automating VMware vCenter / ESX -------------------------------------------------------------------------------- /docs/Solutionpacks/install-ubuntu.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-ubuntu.ps1 will install a Default ubuntu minimal System 2 | currently, ubuntu 14_1,15_10 and 16_4 can be deployed. 3 | Masters are automatically downloaded from Azure labbuildr repo 4 | ![labbuildr_ubuntu_nowatermark](https://cloud.githubusercontent.com/assets/8255007/17725857/106c9cbe-644f-11e6-9b2f-6e1d7b67815a.gif) 5 | A grapical Desktop can be installed. 6 | The size can be controlled with [-Size](https://github.com/bottkars/vmxtoolkit/wiki/Commands#set-vmxsize) 7 | Disks can be added with -Disks ( e.g. for ScaleIO testing ) 8 | the Option -docker adds the latest docker-engine´ 9 | 10 | examples for desktops: 11 | 12 | 13 | ```Powershell 14 | .\install-ubuntu.ps1 -Defaults -ubuntu_ver 16_4 -Desktop cinnamon-desktop-environment 15 | ``` 16 | 17 | ![image](https://cloud.githubusercontent.com/assets/8255007/17455084/f3086620-5bad-11e6-8d44-3a40e58a1155.png) 18 | 19 | ```Powershell 20 | .\install-ubuntu.ps1 -Defaults -ubuntu_ver 16_4 -Desktop lxde -Startnode 2 21 | ``` 22 | ![image](https://cloud.githubusercontent.com/assets/8255007/17455101/246d6e5e-5bae-11e6-9073-8d1082322933.png) 23 | 24 | ```Powershell 25 | .\install-ubuntu.ps1 -Defaults -ubuntu_ver 16_4 -Desktop xfce4 -Startnode 3 26 | ``` 27 | ![image](https://cloud.githubusercontent.com/assets/8255007/17455139/23bac26c-5baf-11e6-9a4e-64f72b7ca5fe.png) 28 | 29 | ```Powershell 30 | .\install-ubuntu.ps1 -Defaults -ubuntu_ver 16_4 -Desktop cinnamon -Startnode 4 31 | ``` 32 | ![image](https://cloud.githubusercontent.com/assets/8255007/17455078/d8e7ffee-5bad-11e6-80f6-33cdeb372f3a.png) 33 | ```Powershell 34 | SYNTAX 35 | C:\labbuildr2016\install-ubuntu.ps1 -Defaults [-Disks ] [-ubuntu_ver ] [-Desktop ] [-Nodes 36 | ] [-Startnode ] [-Defaultsfile ] [-forcedownload] [-ip_startrange ] [-WhatIf] [-Confirm] 37 | [] 38 | 39 | C:\labbuildr2016\install-ubuntu.ps1 [-Disks ] [-ubuntu_ver ] [-Desktop ] [-Sourcedir ] 40 | [-Nodes ] [-Startnode ] [-subnet ] [-BuildDomain ] [-vmnet ] [-forcedownload] 41 | [-ip_startrange ] [-WhatIf] [-Confirm] [] 42 | ``` -------------------------------------------------------------------------------- /docs/Solutionpacks/install-esxiova.ps1.md: -------------------------------------------------------------------------------- 1 | ##about 2 | install-esxiova.ps1 installs nested ESX Servers using William Lam´s templates from [VirtuallyGhetto](http://www.virtuallyghetto.com/2015/12/deploying-nested-esxi-is-even-easier-now-with-the-esxi-virtual-appliance.html) 3 | the installation is in 2 steps: 4 | * download and Import template 5 | * install machine(s) 6 | 7 | ##Import 8 | to download and Import the ova, simply enter 9 | ```Powershell 10 | .\install-esxova.ps1 -nestedesx_ver Nested_ESXi6.5 -import 11 | ``` 12 | this will browse @lamw´s blog for the latest template version (hostet on VMware download site) 13 | if not locally available, the template will be downloaded 14 | the OVA will be imported using vmxtoolkit features 15 | 16 | ![import_esxova](https://cloud.githubusercontent.com/assets/8255007/17780246/f9601cea-656a-11e6-991d-a935376939b2.gif) 17 | 18 | 19 | ##Install 20 | the install utilizes labbuildr default environment to prepopulate the guestconfig. 21 | to start the Installation, use 22 | ```Powershell 23 | .\install-esxova.ps1 -nestedesx_ver Nested_ESXi6.5 -Nodes 3 24 | ``` 25 | this example installs 3 nodes. 26 | ![nested_esxi_3_nodes](https://cloud.githubusercontent.com/assets/8255007/17780248/fce5219e-656a-11e6-9439-14fcd4925267.gif) 27 | 28 | ##Syntax 29 | ` 30 | SYNTAX 31 | D:\ProjectDODO\install-esxiova.ps1 [-nestedesx_ver ] [-Mastername ] [-Disks ] [-Size ] [-Nodes ] 32 | [-Defaults] [-subnet ] [-Sourcedir ] [-Masterpath ] [] 33 | 34 | D:\ProjectDODO\install-esxiova.ps1 [-ovf ] [-nestedesx_ver ] [-Mastername ] [-Disks ] [-Size ] 35 | [-Nodes ] [-Defaults] [-subnet ] [-Sourcedir ] [-Masterpath ] [] 36 | 37 | D:\ProjectDODO\install-esxiova.ps1 -import [-nestedesx_ver ] [-Mastername ] [-Disks ] [-Size ] [-Nodes 38 | ] [-Defaults] [-subnet ] [-Sourcedir ] [-Masterpath ] [] 39 | 40 | D:\ProjectDODO\install-esxiova.ps1 [-nestedesx_ver ] [-Mastername ] [-Disks ] [-Startnode ] [-Size ] 41 | [-Nodes ] [-Defaults] [-subnet ] [-VMnet ] [-Sourcedir ] [-Masterpath ] [] 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](https://cloud.githubusercontent.com/assets/8255007/17669992/3d3a18ba-6310-11e6-829a-2d8fc7995712.jpg) 2 | (http://labbuildr.readthedocs.io/en/master/) 3 | 4 | ======= 5 | 6 | labbuildr is a Framework based upon vmxtoolkit (https://github.com/bottkars/vmxtoolkit). 7 | labbuildr allows on demand creation of lab environments on Vmware Workstation / Fusion 8 | labbuildr deploys the folowing scenarios: 9 | - Exchange / Exchange DAG 2010,2013,2016 10 | - SQL / SQL Always on 2012,2014,2016 11 | - Hyper-V 12 | - Sharepoint 13 | - Standalone VM´s 14 | - Mastering ESXi Installs 15 | - Automating EMC ScaleIO Installs 16 | and any more. 17 | labbuildr can be updated automatically. 18 | labbuildr allows for fully customization of network environment vi a central configuration (labtools) 19 | 20 | labbuildr is based upon prebuilt masters. 21 | See http://labbuildr.readthedocs.io/en/master/Solutionpacks/Master for details 22 | 23 | For the 2016 release, the following changes applied to previous Versions labbuildr: 24 | 25 | - seperation of scripts to labbuildr-scripts 26 | - this allows scripts to be used independant 27 | - new scenarios 28 | - new 2016 Support 29 | - Support for Syctr TP4 ( SCOM and SCVMM ) 30 | - Support for Spaces Direct ( currently with Blank Nodes/Hyper-V Scenario ) 31 | - Hyper-V 32 | - SCOM 33 | - SQL 34 | - Exchange 2016 35 | - Networker 36 | 37 | 38 | 39 | 40 | 41 | 42 | Contributing 43 | ========== 44 | Please contribute in any way to the project. Specifically, normalizing differnet image sizes, locations, and intance types would be easy adds to enhance the usefulness of the project. 45 | 46 | Licensing 47 | ========== 48 | Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 49 | 50 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 51 | 52 | Support 53 | ========== 54 | Please file bugs and issues at the Github issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process. 55 | 56 | 57 | -------------------------------------------------------------------------------- /labbuildr/template/ScaleIOVM_2nics.template: -------------------------------------------------------------------------------- 1 | .encoding = "UTF-8" 2 | displayname = "ScaleIOVM_2nics" 3 | annotation = "Stock SLES template" 4 | guestos = "sles11-64" 5 | virtualhw.version = "11" 6 | config.version = "8" 7 | numvcpus = "2" 8 | cpuid.coresPerSocket = "1" 9 | memsize = "3072" 10 | pciBridge0.present = "TRUE" 11 | pciBridge4.present = "TRUE" 12 | pciBridge4.virtualDev = "pcieRootPort" 13 | pciBridge4.functions = "8" 14 | pciBridge5.present = "TRUE" 15 | pciBridge5.virtualDev = "pcieRootPort" 16 | pciBridge5.functions = "8" 17 | pciBridge6.present = "TRUE" 18 | pciBridge6.virtualDev = "pcieRootPort" 19 | pciBridge6.functions = "8" 20 | pciBridge7.present = "TRUE" 21 | pciBridge7.virtualDev = "pcieRootPort" 22 | pciBridge7.functions = "8" 23 | vmci0.present = "TRUE" 24 | floppy0.present = "FALSE" 25 | ide1:0.clientDevice = "TRUE" 26 | ide1:0.present = "TRUE" 27 | ide1:0.deviceType = "cdrom-raw" 28 | ide1:0.autodetect = "TRUE" 29 | ide1:0.startConnected = "FALSE" 30 | ide1:0.exclusive = "false" 31 | mks.enable3d = "false" 32 | mks.use3dRenderer = "automatic" 33 | svga.autodetect = "false" 34 | svga.vramSize = "4194304" 35 | scsi3.virtualDev = "lsilogic" 36 | scsi3.present = "TRUE" 37 | scsi2.virtualDev = "lsilogic" 38 | scsi2.present = "TRUE" 39 | scsi1.virtualDev = "lsilogic" 40 | scsi1.present = "TRUE" 41 | scsi0:0.present = "TRUE" 42 | scsi0:0.deviceType = "disk" 43 | scsi0:0.fileName = "ScaleIOVM_2nics_2.0.12000.122-disk1.vmdk" 44 | scsi0:0.mode = "persistent" 45 | scsi0:0.writeThrough = "false" 46 | scsi0.virtualDev = "lsilogic" 47 | scsi0.present = "TRUE" 48 | vmci0.unrestricted = "false" 49 | vmci0.pciSlotNumber = "1248" 50 | ethernet0.present = "TRUE" 51 | ethernet0.virtualDev = "vmxnet3" 52 | ethernet0.connectionType = "bridged" 53 | ethernet0.startConnected = "TRUE" 54 | ethernet0.addressType = "generated" 55 | ethernet0.wakeonpcktrcv = "true" 56 | ethernet1.present = "TRUE" 57 | ethernet1.virtualDev = "vmxnet3" 58 | ethernet1.connectionType = "bridged" 59 | ethernet1.startConnected = "TRUE" 60 | ethernet1.addressType = "generated" 61 | ethernet2.present = "TRUE" 62 | ethernet2.virtualDev = "vmxnet3" 63 | ethernet2.connectionType = "bridged" 64 | ethernet2.startConnected = "TRUE" 65 | ethernet2.addressType = "generated" 66 | vcpu.hotadd = "false" 67 | vcpu.hotremove = "false" 68 | firmware = "bios" 69 | mem.hotadd = "false" 70 | nestedHVEnabled = "false" 71 | powerType.powerOff = "soft" 72 | powerType.reset = "soft" 73 | powerType.suspend = "hard" 74 | toolscripts.afterpoweron = "true" 75 | toolscripts.afterresume = "true" 76 | toolscripts.beforepoweroff = "true" 77 | toolscripts.beforesuspend = "true" 78 | tools.syncTime = "false" 79 | tools.upgrade.policy = "manual" 80 | templateVM = "TRUE" -------------------------------------------------------------------------------- /docs/Solutionpacks/install-nve.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-nve to install networker virtual edition 2 | nve (networker virtual edition) is a ova deliverd, pre-configured networker server. 3 | nve uses the avp package format to deliver upgrades. 4 | 5 | install-nve is a 2-step process: 6 | * [import](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-nve.ps1#import) 7 | * [install](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-nve.ps1#install) 8 | 9 | ## import 10 | to download / import an nve from OVA as a master, run 11 | ```Powershell 12 | .\install-nve.ps1 -import 13 | ``` 14 | if no downloaded nve is available, labbuildr will download the required nve from ftp://ftp.legato.com 15 | ![image](https://cloud.githubusercontent.com/assets/8255007/17021437/4e0728da-4f48-11e6-89b3-7a860b76c447.png) 16 | once the download has finished, labbuildr will extract the file an import the master 17 | ![image](https://cloud.githubusercontent.com/assets/8255007/17021889/2dc8afc8-4f4b-11e6-90cc-8706d35397ec.png) 18 | 19 | 20 | ## install 21 | to install a defaul nve, run 22 | ```Powershell 23 | .\install-nve.ps1 -Defaults -nve_ver '9.0.1-72' 24 | ``` 25 | if no base snapshot exists, it will be created. 26 | than a linked clone will be created with a network connection to the default vmnet2 27 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022025/026fe0b6-4f4c-11e6-8577-95a56ce44f7d.png) 28 | once the vm has been booted, the network will be configured. 29 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022094/532159ea-4f4c-11e6-9d14-3d763628ef29.png) 30 | 31 | when prompted, continue installation by bointing your browser to the nve address. 32 | sign in with root/changeme 33 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022165/a4a56432-4f4c-11e6-9606-1edf6376bc3d.png) 34 | the avp installer for nve will start 35 | click on install to start the installation: 36 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022218/016ddece-4f4d-11e6-920b-43c577c14b06.png) 37 | fill in all wizard options as desired, then click continue 38 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022262/4af2fdb8-4f4d-11e6-8f36-b71ed72a574a.png) 39 | wait until partitioning and rpm installation has been done. 40 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022324/a29f5f7a-4f4d-11e6-8006-4e11b0f8f09f.png) 41 | if you want to run Networker Administrator from your VM Host, add the fqdn of your nve to your hosts file 42 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022378/f5d7586e-4f4d-11e6-9a6a-5bb1cb8038da.png) 43 | 44 | ![image](https://cloud.githubusercontent.com/assets/8255007/17022492/8100f77e-4f4e-11e6-9624-7b4aa2241394.png) 45 | 46 | -------------------------------------------------------------------------------- /docs/appendix/networker_cloudboost.md: -------------------------------------------------------------------------------- 1 | ## CheatSheet to install networker and Cloudboost into labbuildr 2 | 3 | 1. Setup Base environment ( not required if using defaults ) 4 | 5 | align settings to your need, example 6 | ```Powershell 7 | Set-LABvmnet vmnet3 # here we use a differnt network 8 | Set-LABsubnet 10.10.3.0 # assign a Subnet 9 | Set-LABDefaultGateway 10.10.3.4 #set our gateway host 10 | Set-LABDNS -DNS1 10.10.3.4 -DNS2 10.10.3.10 # 11 | Set-LABAPT_Cache_IP 10.10.3.200 # for Ubuntu 12 | Set-LABNWver -nw_ver nw9210 # set to you desired NW version 13 | Set-LABMaster -Master 2016_1711 # set to the latest Master for Server 2016 14 | ``` 15 | 16 | 17 | 2. Setup Networker 18 | ```Powershell 19 | ./build-lab.ps1 -Nwserver -nw_ver nw9210 20 | ``` 21 | 22 | install and configure cloudboost 23 | [cloudboost setup](http://labbuildr.readthedocs.io/en/master/Solutionpacks/install-cloudboost.ps1/) 24 | 25 | enable the remote mount password, needed later in Networker Wizard 26 | ```bash 27 | remote-mount-password enable Password123! 28 | ``` 29 | ![grafik](https://user-images.githubusercontent.com/8255007/33317182-bf5f9944-d436-11e7-8deb-3ee55c97fec3.png) 30 | 31 | got to Networker Administration and configure Cloud Boost using the Cloudboost Wizard 32 | 33 | From Devices, right Click on Cloud Boost-->New Device Wizard 34 | ![image](https://user-images.githubusercontent.com/8255007/33317477-9c01f5f4-d437-11e7-98ed-5fbd515ba30a.png) 35 | Select CloudBoost as Device Type 36 | ![image](https://user-images.githubusercontent.com/8255007/33317595-e1c0d998-d437-11e7-9bc7-16893845cc9e.png) 37 | Confirm the Cloudboost Checklist 38 | ![image](https://user-images.githubusercontent.com/8255007/33317644-094dceee-d438-11e7-8800-b64ce9f5d047.png) 39 | in the CloudBoost Configuration Options specify 'remotebackup' as uername and the password you specified earlier 40 | ![image](https://user-images.githubusercontent.com/8255007/33317787-908ac6e6-d438-11e7-86d3-699e149829bd.png) 41 | click next to continue ... 42 | 43 | 44 | on the next screen, make a new folder for your aftd device, in this case dev01 45 | ![image](https://user-images.githubusercontent.com/8255007/33335921-c652821a-d46e-11e7-8b69-8583b668e37f.png) 46 | clock next ... 47 | 48 | Configure a backup pool name or leave the default name/use an existing pool 49 | ![image](https://user-images.githubusercontent.com/8255007/33336681-000f20ec-d471-11e7-8066-9be944fd346f.png) 50 | 51 | click next 52 | 53 | review the configuration and finish the setup with configure 54 | 55 | ![image](https://user-images.githubusercontent.com/8255007/33336914-b5b86c46-d471-11e7-8c4f-77084cb1f485.png) 56 | 57 | ![image](https://user-images.githubusercontent.com/8255007/33337330-f1e690d4-d472-11e7-9b39-b5d99060d6b8.png) 58 | 59 | -------------------------------------------------------------------------------- /labbuildr/template/UnityVSA.template: -------------------------------------------------------------------------------- 1 | .encoding = "UTF-8" 2 | displayname = "UnityVSA" 3 | annotation = "UnityVSA Appliance" 4 | guestos = "other-64" 5 | virtualhw.version = "11" 6 | config.version = "8" 7 | numvcpus = "2" 8 | cpuid.coresPerSocket = "1" 9 | memsize = "12288" 10 | pciBridge0.present = "TRUE" 11 | pciBridge4.present = "TRUE" 12 | pciBridge4.virtualDev = "pcieRootPort" 13 | pciBridge4.functions = "8" 14 | pciBridge5.present = "TRUE" 15 | pciBridge5.virtualDev = "pcieRootPort" 16 | pciBridge5.functions = "8" 17 | pciBridge6.present = "TRUE" 18 | pciBridge6.virtualDev = "pcieRootPort" 19 | pciBridge6.functions = "8" 20 | pciBridge7.present = "TRUE" 21 | pciBridge7.virtualDev = "pcieRootPort" 22 | pciBridge7.functions = "8" 23 | vmci0.present = "TRUE" 24 | floppy0.present = "FALSE" 25 | ethernet0.present = "TRUE" 26 | ethernet0.virtualDev = "vmxnet3" 27 | ethernet0.connectionType = "bridged" 28 | ethernet0.startConnected = "TRUE" 29 | ethernet0.addressType = "generated" 30 | ethernet1.present = "TRUE" 31 | ethernet1.virtualDev = "vmxnet3" 32 | ethernet1.connectionType = "bridged" 33 | ethernet1.startConnected = "TRUE" 34 | ethernet1.addressType = "generated" 35 | ethernet2.present = "TRUE" 36 | ethernet2.virtualDev = "vmxnet3" 37 | ethernet2.connectionType = "bridged" 38 | ethernet2.startConnected = "TRUE" 39 | ethernet2.addressType = "generated" 40 | ethernet3.present = "TRUE" 41 | ethernet3.virtualDev = "vmxnet3" 42 | ethernet3.connectionType = "bridged" 43 | ethernet3.startConnected = "TRUE" 44 | ethernet3.addressType = "generated" 45 | ethernet4.present = "TRUE" 46 | ethernet4.virtualDev = "vmxnet3" 47 | ethernet4.connectionType = "bridged" 48 | ethernet4.startConnected = "TRUE" 49 | ethernet4.addressType = "generated" 50 | ethernet5.present = "TRUE" 51 | ethernet5.virtualDev = "vmxnet3" 52 | ethernet5.connectionType = "bridged" 53 | ethernet5.startConnected = "TRUE" 54 | ethernet5.addressType = "generated" 55 | scsi0:0.present = "TRUE" 56 | scsi0:0.deviceType = "disk" 57 | scsi0:0.fileName = "UnityVSA-disk1.vmdk" 58 | scsi0:0.mode = "persistent" 59 | scsi0:1.present = "TRUE" 60 | scsi0:1.deviceType = "disk" 61 | scsi0:1.fileName = "UnityVSA-disk2.vmdk" 62 | scsi0:2.present = "TRUE" 63 | scsi0:2.deviceType = "disk" 64 | scsi0:2.fileName = "UnityVSA-disk3.vmdk" 65 | scsi0.virtualDev = "lsilogic" 66 | scsi0.present = "TRUE" 67 | toolscripts.afterpoweron = "true" 68 | toolscripts.afterresume = "true" 69 | toolscripts.beforepoweroff = "true" 70 | toolscripts.beforesuspend = "true" 71 | time.synchronize.continue = "0" 72 | time.synchronize.restore = "0" 73 | time.synchronize.resume.disk = "0" 74 | time.synchronize.shrink = "0" 75 | time.synchronize.tools.startup = "0" 76 | time.synchronize.tools.enable = "0" 77 | time.synchronize.resume.host = "0" 78 | disk.enableUUID = "TRUE" 79 | smbios.assetTag = "UnityVSA200ESX12SA" 80 | templateVM = "TRUE" -------------------------------------------------------------------------------- /docs/Solutionpacks/install-scaleiosvm.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-scaleiosvm 2 | 3 | ![image](https://cloud.githubusercontent.com/assets/8255007/17015009/11a78116-4f28-11e6-8255-c8ded6529acc.png) 4 | 5 | install-scaleiosvm installs a 3-Node ScaleIO Cluster based upon the ScaleIO VMware Storage Virtual Machine ( SVM ). 6 | the process is devided in 2 steps: 7 | * [import](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-scaleiosvm.ps1#import) 8 | * [install](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-scaleiosvm.ps1#install) 9 | 10 | ## import 11 | 12 | we import the SVM with 13 | ```Powershell 14 | .\install-scaleiosvm.ps1 -import 15 | ``` 16 | labbuildr will select the sourcedir from defaults as well as the master directory 17 | if no svm to import is found, you will be asked fro download ( can be surpressed with -confirm:$false ) 18 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014178/723d85d4-4f23-11e6-9902-6f07029a45d5.png) 19 | 20 | the download i then started by using the labbuildr command receive-labscaleio 21 | 22 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014288/1ee2a4f4-4f24-11e6-8970-17ce85e6d507.png) 23 | 24 | during the import, you may see some warnings from the ova tool, you can just ignore them. 25 | when the import is successfull, the command for creating a default ScaleIO Cluster is presented: 26 | 27 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014369/8937e4ae-4f24-11e6-9e04-7509cecafe44.png) 28 | 29 | ## install 30 | the installaion is started with 31 | ```Powershell 32 | .\install-scaleiosvm.ps1 -ScaleIOMaster C:\SharedMaster\ScaleIOVM_2nics_2.0.6035.0 33 | ``` 34 | labbuildr will first will check for the specified master and cerate a base snapshot. 35 | after the basesnapshot is done, 3 VM´s are cerated, and each get a default of 3 additional diskdrives 36 | 37 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014512/3c8c9072-4f25-11e6-95fe-94dad028c770.png) 38 | 39 | in the node configuration sequence, labbuildr will show the commands issued to the nodes for base configuration and scaleio software installation 40 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014792/dc52ed8a-4f26-11e6-9a70-064997d7739a.png) 41 | 42 | in the configure scaleio section, a Default Scaleio Cluster is created 43 | 44 | all commands issued are shown in the output 45 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014930/90edbfb8-4f27-11e6-862d-eb1a86fbfb5a.png) 46 | thw comlete installation shouls be donw within 6 Minutes: 47 | 48 | ![image](https://cloud.githubusercontent.com/assets/8255007/17014987/ed79e248-4f27-11e6-9741-432deb766c86.png) 49 | 50 | 51 | 52 | ![image](https://cloud.githubusercontent.com/assets/8255007/17015009/11a78116-4f28-11e6-8255-c8ded6529acc.png) 53 | 54 | 55 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | 2 | ![logo](https://cloud.githubusercontent.com/assets/8255007/17669992/3d3a18ba-6310-11e6-829a-2d8fc7995712.jpg) 3 | 4 | 5 | ## About 6 | labbuildr is a Framework based upon vmxtookit. 7 | labbuildr allows on demand creation of lab environments 8 | labbuildr deploys the folowing scenarios: 9 | - Exchange / Exchange DAG 2010,2013,2016 10 | - SQL / SQL Always on 2012,2014,2016 11 | - Hyper-V 12 | - Standalone VM´s 13 | - Sharepoint 14 | - Mastering ESXi Installs 15 | - Automating EMC ScaleIO Installs 16 | - DELL|EMC Isilon 17 | - Networker 18 | - Avamar 19 | - System Center 20 | ..... 21 | 22 | 23 | 24 | ## Update 25 | to update from labbuildr from prevoious release, run update: 26 | build-lab.ps1 -update 27 | 28 | 29 | ## Install 30 | 31 | labbuildr can be installed using PowershellGet. If you are note running Windows 10, install PowershellGet from 32 | [Powershell Gallery](https://www.powershellgallery.com) 33 | 34 | ![Installation via Powershell Get](https://user-images.githubusercontent.com/8255007/27817547-0991ef12-6092-11e7-9f57-0860e5cb6c83.png) 35 | ### Fully automated Installation Using Powershell Get Method 36 | ```Powershell 37 | Install-Script install-labbuildr -Force -Scope CurrentUser 38 | install-labbuildr.ps1 -branch master 39 | ``` 40 | 41 | 42 | ### Fully automated Installation from powershell Using Download Method 43 | ```Powershell 44 | $Uri = "https://gist.githubusercontent.com/bottkars/410fe056809c38d96562/raw/install-labbuildr.ps1" 45 | $DownloadLocation = "$Env:USERPROFILE\Downloads" 46 | $File = Split-Path -Leaf $Uri 47 | $OutFile = Join-Path $DownloadLocation $File 48 | Invoke-WebRequest -Uri $Uri -OutFile $OutFile 49 | Unblock-File -Path $Outfile 50 | Invoke-Expression $OutFile 51 | ``` 52 | fo detailed installation instructions, see [Student Guide](student_guide.md) 53 | 54 | ## Directory Structure 55 | 56 | 57 | labbuildr -- | 58 | |--labbuildr-scripts 59 | |--labtools 60 | |--vmxtoolkit 61 | 62 | 63 | 64 | 65 | 66 | ## Contributing 67 | Please contribute in any way to the project. Specifically, normalizing differnet image sizes, locations, and intance types would be easy adds to enhance the usefulness of the project. 68 | 69 | ## Licensing 70 | Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 71 | 72 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 73 | 74 | ## Support 75 | Please file bugs and issues at the Github issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process. 76 | 77 | 78 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-ecs3.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-ecs3 2 | the new ecs3 installer uses labbuildr new-lab-vmx and set-labcentosvmx cmdlets to use a streamlined deployment of the operatin system. 3 | also, the new ecs installer is used, using ansible and a containerized installation method 4 | 5 | a new ecs single node deployment is started with 6 | ```Powershell 7 | .\install-ecs3.ps1 8 | ``` 9 | 10 | if no operating system master for centos is found, it will be downloaded automatically from labbuildr repo on azure 11 | ![image](https://cloud.githubusercontent.com/assets/8255007/26436602/f7aa38a2-4117-11e7-917d-efd6bb8eb420.png) 12 | enter y to start download 13 | ![image](https://cloud.githubusercontent.com/assets/8255007/26436636/2ad2eaf8-4118-11e7-9168-ec36d30fdcd3.png) 14 | after the master is downloaded, a base snap is created. 15 | 16 | a linked clone is than created a and customized. ( -fullclone create a full clone ) 17 | during customization, 3 disks, 16GB and 4CPU are added. 18 | 19 | to speed up installation time, the containerimage for ecs will always be stored on the labbuildr sources preserving the image tag. specific images can be selected from istall-ecs3 20 | 21 | 22 | once all seetings are done, the bootsrap process for ecs is done. 23 | ![image](https://cloud.githubusercontent.com/assets/8255007/26436902/251a4fe6-411a-11e7-9354-d9376a09606a.png) 24 | after the bootstrap and injecting a customized deploy.yaml file, ecs node will reboot. 25 | you can follow the progress of the bootstrap on ecsnode1 by doing 26 | ``` 27 | tail -f /ECS-CommunityEdition/install.log 28 | ``` 29 | 30 | ![image](https://cloud.githubusercontent.com/assets/8255007/26437099/5d89315c-411b-11e7-8627-83539cb3d065.png) 31 | 32 | after reboot, step1 will start once docker service is up and running 33 | 34 | ![image](https://cloud.githubusercontent.com/assets/8255007/26437184/d22ceaa8-411b-11e7-9591-d7cce6c61f4c.png) 35 | 36 | you can monitor step1 by 37 | ``` 38 | tail -f /tmp/systemd-private-*-vmtoolsd.service-*/tmp/labbuildr.log 39 | ``` 40 | ![image](https://cloud.githubusercontent.com/assets/8255007/26437939/4ae4c232-4120-11e7-8baf-67b4be6880fd.png) 41 | 42 | 43 | once step1 is finished, step2 starts automatically. 44 | you can monitor step2 by 45 | ``` 46 | tail -f /tmp/systemd-private-*-vmtoolsd.service-*/tmp/labbuildr.log 47 | ``` 48 | 49 | ![image](https://cloud.githubusercontent.com/assets/8255007/26439048/9f273b80-4126-11e7-8720-4a4aebc41679.png) 50 | 51 | once finished, the deploymenttimes will be displayed for each step. 52 | ![image](https://cloud.githubusercontent.com/assets/8255007/26439527/e5d67db4-4128-11e7-9365-68f25563cebd.png) 53 | 54 | you can now login to your ecs instance with root / changeme. 55 | follow the instructions of the wizard 56 | 57 | 58 | ![image](https://cloud.githubusercontent.com/assets/8255007/26439615/3b259ba6-4129-11e7-9c28-228e37dcec44.png) 59 | 60 | 61 | ![image](https://cloud.githubusercontent.com/assets/8255007/26439713/8b6e2bc8-4129-11e7-8f9a-d6f657053a0c.png) 62 | 63 | 64 | 65 | 66 | custom parameters can be specified, see get-help install-ecs3.ps1 67 | 68 | 69 | once the node is booted, the system is running the network configuration of the node 70 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-ecs.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-ecs 2 | a new ecs single node deployment is started with 3 | ```Powershell 4 | .\install-ecs.ps1 -Defaults 5 | ``` 6 | if no operating system master for centos is found, it will be downloaded automatically from labbuildr repo on azure 7 | ![image](https://cloud.githubusercontent.com/assets/8255007/17015627/73d4cf76-4f2b-11e6-9067-a0e37e14e17d.png) 8 | enter y to start download 9 | ![image](https://cloud.githubusercontent.com/assets/8255007/17015681/ce980e8c-4f2b-11e6-89c1-d37d19040f68.png) 10 | 11 | after the master is downloaded, a base snap is created. 12 | 13 | a linked clone is than created a and customized. ( -fullclone create a full clone ) 14 | ![image](https://cloud.githubusercontent.com/assets/8255007/17016167/190dd170-4f2e-11e6-92ec-f7c6d791a57e.png) 15 | during customization, 3 disks, 12GB and 4CPU are added 16 | custom parameters can be specified, see get-help install-ecs.ps1 17 | 18 | 19 | once the node is booted, the system is running the network configuration of the node 20 | 21 | ![image](https://cloud.githubusercontent.com/assets/8255007/17015941/06fc0fe8-4f2d-11e6-86e7-86e1e944b025.png) 22 | 23 | before starting package installs and downloads, the default route is verified. 24 | after that, various downloads are started and saved to reduce downloads for subsequent redeploys: 25 | * yum packages, wich will be stored in $sources\centos using redirected yum directory for later use 26 | * docker image, wich will be saved in $sources\docker, for later use 27 | 28 | ![image](https://cloud.githubusercontent.com/assets/8255007/17016402/544d40da-4f2f-11e6-9f39-66e764df742b.png) 29 | 30 | once the base installation is finished and the docker container is downloaded, the script will run the step1 installation from ECS Community Edition 31 | ![image](https://cloud.githubusercontent.com/assets/8255007/17016651/506a2cac-4f30-11e6-872e-d498cec3ccd6.png) 32 | this will 33 | * configure disk drives for the ecs system 34 | * configure the network / hostname for the container 35 | * tweak some settngs in the ecs container to run as single node 36 | the step will take some minutes and is finished once the ecs default website is reachable 37 | 38 | once the system can login to the ecs site, the docker container is set to start on boot. 39 | next, the initial configuration of namespace, pools, datastores, virtual datacenter and users is done: 40 | ![image](https://cloud.githubusercontent.com/assets/8255007/17017050/0e11a4dc-4f32-11e6-8089-66c574879efd.png) 41 | 42 | for first login, please wait until deployment is finished: 43 | ![image](https://cloud.githubusercontent.com/assets/8255007/17020888/7ef6f9a6-4f44-11e6-88b6-11fdf39217a0.png) 44 | 45 | log on to you ecs instance with root/ChangeMe 46 | ![image](https://cloud.githubusercontent.com/assets/8255007/17020983/003d6b76-4f45-11e6-8e04-8b22256b7323.png) 47 | 48 | change your password, ecs ui will reload 49 | ![image](https://cloud.githubusercontent.com/assets/8255007/17021032/66168e0a-4f45-11e6-9156-0caa58be802a.png) 50 | 51 | when the wizard starts again, click "no thanks, i`ll get started on my own" 52 | 53 | ![image](https://cloud.githubusercontent.com/assets/8255007/17021075/aecac45e-4f45-11e6-8056-3eea2f2bda7c.png) 54 | 55 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-centos.ps1.md: -------------------------------------------------------------------------------- 1 | install-centos is used to install a new, blank centos system. 2 | it is a general purpose machine to be used for sdc / networker storage node / iscsi or other things. 3 | options to pre-install a praphical ui like cinnamon desktop are available. 4 | the sources directory is available via _/mnt/hgfs_ 5 | start the installer with 6 | ```Powershell 7 | .\install-centos.ps1 -Defaults -centos_ver 7 8 | ``` 9 | this will launch the centos install. if no master is available for $MasterPath, labbuildr will ask for download ( remember, -confirm:$false will do without asking ) 10 | ![image](https://cloud.githubusercontent.com/assets/8255007/17127022/a2d2bf10-5302-11e6-989e-4b614c80aeb7.png) 11 | once the master is extracted an prepared, the vm will be prepared and boot for customization 12 | 13 | ![image](https://cloud.githubusercontent.com/assets/8255007/17127086/31cb1582-5303-11e6-8c23-737692475245.png) 14 | during the node configuration, all bash commands with return state are beeing displayed 15 | ![image](https://cloud.githubusercontent.com/assets/8255007/17127109/689bce6c-5303-11e6-90ee-b4d1de22b77e.png) 16 | 17 | to view the passwords of the vm in the annotation, just enter: 18 | ```Powershell 19 | Get-VMX .\Centos1\ | Get-VMXAnnotation 20 | ``` 21 | ![image](https://cloud.githubusercontent.com/assets/8255007/17129181/e9da5e18-5311-11e6-9d41-468719266a10.png) 22 | 23 | passwordless authentication is supported vi ssh rsa keys. see https://community.emc.com/blogs/bottk/2016/01/31/labbuildrthe-hidden-secrets-connect-linux-vm-with-putty-and-private-key 24 | 25 | 26 | ## options 27 | ```Powershell 28 | SYNTAX 29 | C:\labbuildr2016\install-centos.ps1 -Defaults [-Disks ] [-centos_ver ] [-Desktop ] [-Nodes ] [-Startnode 30 | ] [-Defaultsfile ] [-forcedownload] [-ip_startrange ] [-WhatIf] [-Confirm] [] 31 | 32 | C:\labbuildr2016\install-centos.ps1 [-Disks ] [-centos_ver ] [-Desktop ] [-Sourcedir ] [-Nodes ] 33 | [-Startnode ] [-subnet ] [-BuildDomain ] [-vmnet ] [-forcedownload] [-ip_startrange ] [-WhatIf] 34 | [-Confirm] [] 35 | ``` 36 | 37 | ``` 38 | OPTIONS 39 | -Defaults 40 | [-Disks ] 41 | [-centos_ver ] 42 | Centos Version to use. 43 | Must correlate with version of an available source master 44 | [-Desktop ] 45 | What desktop to install. 46 | Can be "cinnamon" or "none" (default: "none") 47 | [-Nodes ] 48 | Number of nodes to install. Default is 1 49 | [-Startnode ] 50 | Start numbering the nodes at this number. 51 | [-Defaultsfile ] 52 | [-forcedownload] 53 | [-ip_startrange ] 54 | Last octet of the ip address which to assign to the nodes. 55 | First ip assigned will be ip_startrange+startnode. 56 | I.e. if you start at startnode=1 and ip_startrange=100, 57 | the first IP will be X.X.X.101 58 | If you think this to be too confusing, just start your nodes at 0 59 | [-docker] 60 | [-Size ] 61 | Choose a size for the VM. 62 | See source code of build-lab for sizes and what they mean. 63 | [-WhatIf] 64 | Does nothing. Not found in source code. 65 | [-Confirm] 66 | [] 67 | ``` -------------------------------------------------------------------------------- /docs/Solutionpacks/install-coprhd.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-coprhd 2 | 3 | install-coprhd.ps1 will install the latest coprhd ( open-source emc vipr, see https://coprhd.github.io/ ). 4 | start the deployment with 5 | ```Powershell 6 | .\install-coprhd.ps1 -Defaults 7 | ``` 8 | as a base, an OpenSuse Master image is required and will be downloaded from labbuildr repo on azure. 9 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092565/dcacb8cc-5243-11e6-9ae2-3f62bdd652e9.png) 10 | 11 | after successful download, the base machine is built 12 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092632/37609630-5244-11e6-89ee-a5f9f41c7bb8.png) 13 | the configuration of the machine will be adjusted to meet the requirements of CoprHD 14 | once the basic machine config is done, the machine will be started and the basic network configuration is done. 15 | make sure to have a proper default gateway / openwrt installed for the virtual machine to access the internet. 16 | 17 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092656/559cb00c-5244-11e6-88fb-b70573a27b5f.png) 18 | 19 | right after the basic network configs and ssh configuration is finished, the machine will clone into CoprHD on GitHub 20 | all bash command issued will be displayed form invoke-vmxbash ( vmxtoolkit bash for powershell ) with a state of success or failed. 21 | 22 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092792/400b9bc6-5245-11e6-9dab-8c0204eb6c7c.png) 23 | the log written under /tmp for the installation can be viewed from inside the vm with 24 | ```bash 25 | tail -f /tmp/installPackages.log 26 | ``` 27 | the log used can be taken form the powershell command ( in this example installPackages.log ). 28 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092863/c2c79056-5245-11e6-983f-be7b7d32b946.png) 29 | 30 | a zypper cache is installed in your sources directory, to speed up subsequent deployments of coprhd. 31 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092915/1a1be35c-5246-11e6-8d21-3a65cd2ceff1.png) 32 | 33 | the same applies to the build process of CoprHD 34 | ![image](https://cloud.githubusercontent.com/assets/8255007/17092991/a6017a58-5246-11e6-9bc8-8b21658aae8e.png) 35 | 36 | ![image](https://cloud.githubusercontent.com/assets/8255007/17093022/cdac3f20-5246-11e6-90e1-419351fb7be8.png) 37 | once CoprHD is installed, the deployment has finished. 38 | ![image](https://cloud.githubusercontent.com/assets/8255007/17093875/2cf0a188-524c-11e6-8e03-bcb603f67dc0.png) 39 | in order to access the UI for further configuration, you may need to restart the vm. 40 | login to the ui with root/ChangeMe 41 | ![image](https://cloud.githubusercontent.com/assets/8255007/17093640/bbdccc98-524a-11e6-8a7f-c515f20d026b.png) 42 | during the initail setup, you are asked to change the passwords: 43 | ![image](https://cloud.githubusercontent.com/assets/8255007/17093970/b1d5da58-524c-11e6-86b4-c54383b262a5.png) 44 | enter your dns server ( e.g. dcnode and or OpenWRT ) as well as ntp server. if building in default labbuildr environment, the dcnode can be used as ntp. 45 | ![image](https://cloud.githubusercontent.com/assets/8255007/17094487/e2c5b4be-524f-11e6-9035-b16081b941cb.png) 46 | you may finish now or enter an smtp server. 47 | here is an example for using Office365 as smtp relay: 48 | ![image](https://cloud.githubusercontent.com/assets/8255007/17094103/637494ca-524d-11e6-8b00-0f3980caa0eb.png) 49 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-cloudboost.ps1.md: -------------------------------------------------------------------------------- 1 | # labbuildr cloudboost installation Guide 2 | 3 | Cloudboost Networker Installation 4 | 5 | ## Import CloudBoost OVA 6 | ```Powershell 7 | /install-cloudboost.ps1 -ovf $HOME/Downloads/CloudBoost-2.2.2.ova 8 | ``` 9 | ![Import](https://user-images.githubusercontent.com/8255007/33307618-72fad916-d417-11e7-8563-340616c2e9a1.png) 10 | 11 | ## Install CloudBoost 12 | 13 | There are various option for CloudBoost Deployment, but you simply could go with 14 | ```Powershell 15 | ./install-cloudboost.ps1 -Master $HOME/Master.labbuildr/CloudBoost-2.2.2 16 | ``` 17 | 18 | If ou want to add cache disks, use this command 19 | ```Powershell 20 | ./install-cloudboost.ps1 -Master $HOME/bottk/Master.labbuildr/CloudBoost-2.2.2 -Site_Cache_Disks 3 -Site_Cache_Disk_Size 200GB 21 | ``` 22 | 23 | The Installation will use a Full Clone and add the required disks to it. 24 | 25 | Once finished, the required config commands are presented. 26 | ![InstallATION](https://user-images.githubusercontent.com/8255007/33308309-3a43a51e-d41a-11e7-89c8-1599ad5235e9.png) 27 | 28 | in this example, go to the cloudboost console and lofin with Password password. 29 | you will be asked to change the password: 30 | 31 | ![login](https://user-images.githubusercontent.com/8255007/33313584-608163b8-d42b-11e7-9e24-5888addfd2f6.png) 32 | 33 | now type in the commands to configure provided from the installer. 34 | Example 35 | ```Bash 36 | net config eth0 10.10.3.71 netmask 255.255.255.0 37 | route add 0.0.0.0 netmask 0.0.0.0 gw 10.10.3.4 38 | dns set primary 10.10.3.4 39 | fqdn cloudboost1.labbuildr.local 40 | ``` 41 | 42 | depending on your workstation settings, this might work with copy / paste :-) 43 | 44 | ![grafik](https://user-images.githubusercontent.com/8255007/33314305-8518fd88-d42d-11e7-90d2-e2058ef4c1f3.png) 45 | 46 | Once the Network is configured, trype in 'register' to register the Appliance with dpccloud.com: 47 | 48 | ![grafik](https://user-images.githubusercontent.com/8255007/33314808-0256ef52-d42f-11e7-8d13-e600d4f4e460.png) 49 | 50 | login to https://console.dpccloud.com and select the cloudboost registration from the menu 51 | ![grafik](https://user-images.githubusercontent.com/8255007/33314862-2d6adbb8-d42f-11e7-9dac-91a46e079d48.png) 52 | Enter your Claim Code and register 53 | 54 | ![grafik](https://user-images.githubusercontent.com/8255007/33314926-6c8ab782-d42f-11e7-9d72-3dde537ea1c9.png) 55 | 56 | ![grafik](https://user-images.githubusercontent.com/8255007/33314949-7f87f9f8-d42f-11e7-9cfc-911713872752.png) 57 | 58 | 59 | Click on the direct link to the cloudboost appliance for configuration 60 | it may take a few moments antil heartbeat is synched an the configure tab is enabled: 61 | 62 | ![grafik](https://user-images.githubusercontent.com/8255007/33315224-580c0904-d430-11e7-8642-c378b1a26bd9.png) 63 | 64 | edit you specific configuration details for the appliance 65 | 66 | ![grafik](https://user-images.githubusercontent.com/8255007/33315509-32b87da8-d431-11e7-83d8-7f6b35c003bf.png) 67 | 68 | click on update changes and the appliance will start fongiguring. this will take a few minutes: 69 | 70 | ![grafik](https://user-images.githubusercontent.com/8255007/33315646-8d93b0ee-d431-11e7-977b-4712ad1f3c13.png) 71 | 72 | once the appliance has finished configuring, procced with integartion into you backup software. 73 | 74 | 75 | ![grafik](https://user-images.githubusercontent.com/8255007/33316131-205a7164-d433-11e7-965e-20742ee7b965.png) 76 | ![grafik](https://user-images.githubusercontent.com/8255007/33316175-57181990-d433-11e7-8202-a6068889d468.png) 77 | 78 | see networker cloudboost integration as an example: 79 | [cludboost networker](http://labbuildr.readthedocs.io/en/master/appendix/networker_cloudboost/) 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-mesos.ps1-with-rexray.md: -------------------------------------------------------------------------------- 1 | # install-mesos including support for emc rexray volume driver and scaleio 2 | 3 | mesos with rexray requires a running scaleio environment. i recommend [ScaleIO SVM Solutionpack](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-scaleiosvm.ps1) 4 | In this example, ScleIO SVM was deployed and now additional Volumes / SDC´s are created. 5 | Please make sure to approve the MDM Certificates via the REST Gateway on https://gatewayip:443/rest.jsp 6 | ![image](https://cloud.githubusercontent.com/assets/8255007/17048627/a1774de8-4fe7-11e6-8f44-a4b174ad148a.png) 7 | if you are not using a labbuildr deployed scaleio environment, create a scaleioenv.xml file in the labbuildr dir similar to 8 | ``` 9 | 10 | 192.168.2.191 11 | 192.168.2.192 12 | 192.168.2.193 13 | ScaleIO@labbuildr 14 | SP_labbuildr 15 | PD_labbuildr 16 | 17 | ``` 18 | 19 | you can test the configfile with 20 | ```Powershell 21 | Get-LABSIOConfig 22 | ``` 23 | ![image](https://cloud.githubusercontent.com/assets/8255007/17048878/9202426c-4fe9-11e6-9620-80a7399d13dd.png) 24 | 25 | we start the dployment using 26 | ```Powershell 27 | .\install-mesos.ps1 -Defaults -rexray 28 | ``` 29 | mesos / rexray requires the Centos7 Master. if it is not found in the defaults Masterpath, it will be dowbloaded and extracted from labbuildr repo 30 | 31 | ![image](https://cloud.githubusercontent.com/assets/8255007/17048923/d76e8d60-4fe9-11e6-9af9-f1e16357a234.png) 32 | 33 | once the download is finished, labbuildr will check for ScaleIO Linux Binaries. 34 | ScaleIO Binaries are required for the SDC to enable Container / Application Persisitence on mesos nodes. 35 | if not found, labbuildr will fetch the latest binaries from emc.com 36 | 37 | ![image](https://cloud.githubusercontent.com/assets/8255007/17048985/5a4367d8-4fea-11e6-84d2-2fb6545d231c.png) 38 | once all downloads are finished, a default of 3 mesos is created. the nodes will start, and each nodes get a starting configuration: 39 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049211/2edf1d2e-4fec-11e6-9b32-1a9b410325f2.png) 40 | the sdc gets installed with pointing to the mdm`s provided in the scaleio config file. 41 | each individual node configuration is finished once docker and zookeper are configured and started: 42 | 43 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049283/a5d571a8-4fec-11e6-8bd7-c2c7412c5b1b.png) 44 | 45 | once all nodes are configured, the rexray configuration is pushed to the hosts and the rexray service is enabled. 46 | ![image](https://cloud.githubusercontent.com/assets/8255007/17051495/585c718a-4ff9-11e6-8768-edb87deb2947.png) 47 | 48 | a default application not using volume persistence, and a docker postgres container is created using marathon 49 | 50 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049471/cd1e7f2e-4fed-11e6-9853-ee03c04eff38.png) 51 | 52 | check the ScaleIO UI for new registerd SDC´s and Volumes: 53 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049505/fcbce662-4fed-11e6-9dd6-8d94e7992608.png) 54 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049519/0feb5322-4fee-11e6-9985-7740ff2dd014.png) 55 | 56 | verify the sdc / rexray / container status from the node the container is running on 57 | ````bash 58 | rexray volume list 59 | docker ps 60 | ```` 61 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049648/d6157758-4fee-11e6-9d87-88c642d2fede.png) 62 | 63 | do the same from any other node: 64 | ![image](https://cloud.githubusercontent.com/assets/8255007/17049676/f80986ba-4fee-11e6-900e-6da0c2d2337f.png) 65 | 66 | 67 | -------------------------------------------------------------------------------- /docs/Scenarios/SCOM_ESI_Options.md: -------------------------------------------------------------------------------- 1 | # this guide describes how to deploy A scom testbed using the EMC Storage Integrator 2 | ![image](https://user-images.githubusercontent.com/8255007/27825344-7a20d604-60af-11e7-9509-3bca5efd693b.png) 3 | 4 | follow the deployment, and choose some otional hosts/Storage Devices to install: 5 | 6 | 7 | 8 | 9 | after the ESI Powershell is installed, verify the service is up and Running 10 | 11 | ![image](https://user-images.githubusercontent.com/8255007/27819069-cc536502-6098-11e7-8aa0-448266ed8c66.png) 12 | 13 | browse to https://localhost:54501/esi/console to view the Service for you webbrowser 14 | 15 | Adding systems ( on Controller node, EG, Blanknode ): 16 | 17 | ## Add add UnityVSA to ESI Service: 18 | 19 | 20 | first, verify connection with uemcli 21 | ```Powershell 22 | uemcli.exe -d 192.168.2.171 -u admin -p Password123! /sys/soft/ver show -detail 23 | ``` 24 | 25 | Add the System 26 | ```Powershell 27 | $params = @{"Username"="admin";"Password"="Password123!";"ManagementIp"="192.168.2.171"}; 28 | Add-EmcSystem -SystemType Unity -Params $params -UserFriendlyName UnityVSA 29 | ``` 30 | ## add a ScaleIO System 31 | ```Powershell 32 | $params = @{"Username"="admin";"Password"="Password123!";"IpAddress"="192.168.2.153"}; 33 | Add-EmcSystem -SystemType ScaleIO -Params $params -UserFriendlyName SIO_HyperV 34 | ``` 35 | ![image](https://user-images.githubusercontent.com/8255007/27827573-3155cfac-60b8-11e7-9ba7-281210b115fa.png) 36 | 37 | verify the system has added to the ESI Console with https://localhost:54501/esi/console 38 | 39 | 40 | ![image](https://user-images.githubusercontent.com/8255007/27827635-81338956-60b8-11e7-9f39-0c0b3aacd92f.png) 41 | 42 | Now proceed with the install of the SCOM Management Packs on SCOM Host 43 | ```Powershell 44 | Start-Process msiexec.exe -ArgumentList "/i `"\\vmware-host\shared Folders\sources\esi\ESI.SCOM.ManagementPacks.5.0.1.3.Setup\ESI.SCOM.ManagementPacks.5.0.1.3.Setup.msi`" /passive /log c:\scripts\esilog" -Wait -PassThru 45 | ``` 46 | ## On the SCOM Server 47 | ### install management packs 48 | Open SCOM Powershell to import the Management Packs into SCOM 49 | ```Powershell 50 | Get-SCOMManagementPack -ManagementPackFile 'C:\Program Files (x86)\EMC\ESI SCOM Management Packs\*.*' 51 | Import-SCOMManagementPack -Fullname 'C:\Program Files (x86)\EMC\ESI SCOM Management Packs\*.*' 52 | ``` 53 | ### deploy Management Agent to ESI Controller 54 | ```Powershell 55 | $PrimaryMgmtServer = Get-SCOMManagementServer -ComputerName "SCOM.labbuildr.local" 56 | Install-SCOMAgent -DNSHostName "gennode1.labbuildr.local" -PrimaryManagementServer $PrimaryMgmtServer 57 | ``` 58 | ### edit regitry on ESI Host for Store Maximum 59 | ```Powershell 60 | Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Services\HealthService\Parameters -Value 0x00001400 -Type dword -name "Persistence Version Store Maximum" 61 | Restart-Service HealthService 62 | ``` 63 | 64 | ### create object discovery override for ESI Host 65 | 66 | 67 | In SCOM Management Console, go to 68 | --> Authoring --Discovery 69 | and search for EMC SI Sevice Discovery 70 | right click on Overrides, Override the Object Discovery, for a specific Object of Class Windows Computer 71 | ![image](https://user-images.githubusercontent.com/8255007/27821583-0e74879a-60a3-11e7-81a3-f584e962b067.png) 72 | Select teh ESI Controller host 73 | Adjust the Values 74 | 75 | ![override](https://user-images.githubusercontent.com/8255007/27834088-cecba802-60d5-11e7-9f1d-08687ff9212c.png) 76 | 77 | Wait some time for the Discovery Cycles to Fully discover your ESI Environment 78 | 79 | ## Example Override Summary 80 | ![image](https://user-images.githubusercontent.com/8255007/27833794-8512815a-60d4-11e7-87a8-1eabe4c5cd74.png) 81 | 82 | -------------------------------------------------------------------------------- /labbuildr/template/Nested_ESXi6.5U1_Appliance_Template_v1.0.template: -------------------------------------------------------------------------------- 1 | .encoding = "UTF-8" 2 | displayname = "Nested_ESXi6.5d_Appliance_Template_v1.0" 3 | annotation = "Nested ESXi 6.5d Appliance (Build 5310538)|0D|0Awww.virtuallyghetto.com" 4 | guestos = "other" 5 | virtualhw.version = "11" 6 | config.version = "8" 7 | numvcpus = "2" 8 | cpuid.coresPerSocket = "1" 9 | memsize = "6144" 10 | pciBridge0.present = "TRUE" 11 | pciBridge4.present = "TRUE" 12 | pciBridge4.virtualDev = "pcieRootPort" 13 | pciBridge4.functions = "8" 14 | pciBridge5.present = "TRUE" 15 | pciBridge5.virtualDev = "pcieRootPort" 16 | pciBridge5.functions = "8" 17 | pciBridge6.present = "TRUE" 18 | pciBridge6.virtualDev = "pcieRootPort" 19 | pciBridge6.functions = "8" 20 | pciBridge7.present = "TRUE" 21 | pciBridge7.virtualDev = "pcieRootPort" 22 | pciBridge7.functions = "8" 23 | vmci0.present = "TRUE" 24 | floppy0.present = "TRUE" 25 | floppy0.fileType = "device" 26 | floppy0.autodetect = "FALSE" 27 | floppy0.startConnected = "FALSE" 28 | floppy0.clientDevice = "TRUE" 29 | ide1:0.clientDevice = "TRUE" 30 | ide1:0.present = "TRUE" 31 | ide1:0.deviceType = "cdrom-raw" 32 | ide1:0.autodetect = "TRUE" 33 | ide1:0.startConnected = "FALSE" 34 | ide1:0.exclusive = "false" 35 | mks.enable3d = "false" 36 | mks.use3dRenderer = "automatic" 37 | svga.autodetect = "false" 38 | svga.vramSize = "4194304" 39 | scsi0:0.present = "TRUE" 40 | scsi0:0.deviceType = "disk" 41 | scsi0:0.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk1.vmdk" 42 | scsi0:0.mode = "persistent" 43 | scsi0:0.writeThrough = "false" 44 | scsi0:1.present = "TRUE" 45 | scsi0:1.deviceType = "disk" 46 | scsi0:1.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk2.vmdk" 47 | scsi0:2.present = "TRUE" 48 | scsi0:2.deviceType = "disk" 49 | scsi0:2.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk3.vmdk" 50 | scsi0.virtualDev = "lsilogic" 51 | scsi0.present = "TRUE" 52 | vmci0.unrestricted = "false" 53 | vmci0.pciSlotNumber = "192" 54 | ethernet0.present = "TRUE" 55 | ethernet0.virtualDev = "vmxnet3" 56 | ethernet0.connectionType = "bridged" 57 | ethernet0.startConnected = "TRUE" 58 | ethernet0.addressType = "generated" 59 | ethernet0.wakeonpcktrcv = "true" 60 | ethernet1.present = "TRUE" 61 | ethernet1.virtualDev = "vmxnet3" 62 | ethernet1.connectionType = "bridged" 63 | ethernet1.startConnected = "TRUE" 64 | ethernet1.addressType = "generated" 65 | vcpu.hotadd = "false" 66 | vcpu.hotremove = "false" 67 | firmware = "bios" 68 | mem.hotadd = "false" 69 | nestedHVEnabled = "true" 70 | powerType.powerOff = "soft" 71 | powerType.reset = "soft" 72 | powerType.suspend = "hard" 73 | toolscripts.afterpoweron = "true" 74 | toolscripts.afterresume = "true" 75 | toolscripts.beforepoweroff = "true" 76 | toolscripts.beforesuspend = "true" 77 | tools.syncTime = "false" 78 | tools.upgrade.policy = "manual" 79 | chipset.onlineStandby = "FALSE" 80 | vmotion.checkpointSVGAPrimarySize = "4194304" 81 | virtualHW.productCompatibility = "hosted" 82 | ethernet1.pciSlotNumber = "192" 83 | disk.enableUUID = "TRUE" 84 | pciBridge6.pciSlotNumber = "23" 85 | scsi0:1.virtualSSD = "1" 86 | checkpoint.vmState.readOnly = "FALSE" 87 | pciBridge4.pciSlotNumber = "21" 88 | hpet0.present = "TRUE" 89 | numa.autosize.cookie = "20001" 90 | monitor.phys_bits_used = "42" 91 | svga.present = "TRUE" 92 | scsi0:2.virtualSSD = "1" 93 | replay.supported = "false" 94 | featMask.vm.hv.capable = "Min:1" 95 | pciBridge7.pciSlotNumber = "24" 96 | ethernet0.filter4.name = "dvfilter-maclearn" 97 | pciBridge0.pciSlotNumber = "17" 98 | ethernet0.pciSlotNumber = "160" 99 | scsi0.pciSlotNumber = "224" 100 | pciBridge5.pciSlotNumber = "22" 101 | softPowerOff = "TRUE" 102 | scsi0:0.virtualSSD = "0" 103 | ethernet0.filter4.onFailure = "failOpen" 104 | toolsInstallManager.updateCounter = "2" 105 | numa.autosize.vcpu.maxPerVirtualNode = "2" 106 | vmotion.checkpointFBSize = "4194304" 107 | ethernet1.filter4.name = "dvfilter-maclearn" 108 | ethernet1.filter4.onFailure = "failOpen" 109 | templateVM = "TRUE" -------------------------------------------------------------------------------- /labbuildr/template/Nested_ESXi6.5d_Appliance_Template_v1.0.template: -------------------------------------------------------------------------------- 1 | .encoding = "UTF-8" 2 | displayname = "Nested_ESXi6.5d_Appliance_Template_v1.0" 3 | annotation = "Nested ESXi 6.5d Appliance (Build 5310538)|0D|0Awww.virtuallyghetto.com" 4 | guestos = "other" 5 | virtualhw.version = "11" 6 | config.version = "8" 7 | numvcpus = "2" 8 | cpuid.coresPerSocket = "1" 9 | memsize = "6144" 10 | pciBridge0.present = "TRUE" 11 | pciBridge4.present = "TRUE" 12 | pciBridge4.virtualDev = "pcieRootPort" 13 | pciBridge4.functions = "8" 14 | pciBridge5.present = "TRUE" 15 | pciBridge5.virtualDev = "pcieRootPort" 16 | pciBridge5.functions = "8" 17 | pciBridge6.present = "TRUE" 18 | pciBridge6.virtualDev = "pcieRootPort" 19 | pciBridge6.functions = "8" 20 | pciBridge7.present = "TRUE" 21 | pciBridge7.virtualDev = "pcieRootPort" 22 | pciBridge7.functions = "8" 23 | vmci0.present = "TRUE" 24 | floppy0.present = "TRUE" 25 | floppy0.fileType = "device" 26 | floppy0.autodetect = "FALSE" 27 | floppy0.startConnected = "FALSE" 28 | floppy0.clientDevice = "TRUE" 29 | ide1:0.clientDevice = "TRUE" 30 | ide1:0.present = "TRUE" 31 | ide1:0.deviceType = "cdrom-raw" 32 | ide1:0.autodetect = "TRUE" 33 | ide1:0.startConnected = "FALSE" 34 | ide1:0.exclusive = "false" 35 | mks.enable3d = "false" 36 | mks.use3dRenderer = "automatic" 37 | svga.autodetect = "false" 38 | svga.vramSize = "4194304" 39 | scsi0:0.present = "TRUE" 40 | scsi0:0.deviceType = "disk" 41 | scsi0:0.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk1.vmdk" 42 | scsi0:0.mode = "persistent" 43 | scsi0:0.writeThrough = "false" 44 | scsi0:1.present = "TRUE" 45 | scsi0:1.deviceType = "disk" 46 | scsi0:1.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk2.vmdk" 47 | scsi0:2.present = "TRUE" 48 | scsi0:2.deviceType = "disk" 49 | scsi0:2.fileName = "Nested_ESXi6.5d_Appliance_Template_v1.0-disk3.vmdk" 50 | scsi0.virtualDev = "lsilogic" 51 | scsi0.present = "TRUE" 52 | vmci0.unrestricted = "false" 53 | vmci0.pciSlotNumber = "192" 54 | ethernet0.present = "TRUE" 55 | ethernet0.virtualDev = "vmxnet3" 56 | ethernet0.connectionType = "bridged" 57 | ethernet0.startConnected = "TRUE" 58 | ethernet0.addressType = "generated" 59 | ethernet0.wakeonpcktrcv = "true" 60 | ethernet1.present = "TRUE" 61 | ethernet1.virtualDev = "vmxnet3" 62 | ethernet1.connectionType = "bridged" 63 | ethernet1.startConnected = "TRUE" 64 | ethernet1.addressType = "generated" 65 | vcpu.hotadd = "false" 66 | vcpu.hotremove = "false" 67 | firmware = "bios" 68 | mem.hotadd = "false" 69 | nestedHVEnabled = "true" 70 | powerType.powerOff = "soft" 71 | powerType.reset = "soft" 72 | powerType.suspend = "hard" 73 | toolscripts.afterpoweron = "true" 74 | toolscripts.afterresume = "true" 75 | toolscripts.beforepoweroff = "true" 76 | toolscripts.beforesuspend = "true" 77 | tools.syncTime = "false" 78 | tools.upgrade.policy = "manual" 79 | chipset.onlineStandby = "FALSE" 80 | vmotion.checkpointSVGAPrimarySize = "4194304" 81 | virtualHW.productCompatibility = "hosted" 82 | ethernet1.pciSlotNumber = "192" 83 | disk.enableUUID = "TRUE" 84 | pciBridge6.pciSlotNumber = "23" 85 | scsi0:1.virtualSSD = "1" 86 | checkpoint.vmState.readOnly = "FALSE" 87 | pciBridge4.pciSlotNumber = "21" 88 | hpet0.present = "TRUE" 89 | numa.autosize.cookie = "20001" 90 | monitor.phys_bits_used = "42" 91 | svga.present = "TRUE" 92 | scsi0:2.virtualSSD = "1" 93 | replay.supported = "false" 94 | featMask.vm.hv.capable = "Min:1" 95 | pciBridge7.pciSlotNumber = "24" 96 | ethernet0.filter4.name = "dvfilter-maclearn" 97 | pciBridge0.pciSlotNumber = "17" 98 | ethernet0.pciSlotNumber = "160" 99 | scsi0.pciSlotNumber = "224" 100 | pciBridge5.pciSlotNumber = "22" 101 | softPowerOff = "TRUE" 102 | scsi0:0.virtualSSD = "0" 103 | ethernet0.filter4.onFailure = "failOpen" 104 | toolsInstallManager.updateCounter = "2" 105 | numa.autosize.vcpu.maxPerVirtualNode = "2" 106 | vmotion.checkpointFBSize = "4194304" 107 | ethernet1.filter4.name = "dvfilter-maclearn" 108 | ethernet1.filter4.onFailure = "failOpen" 109 | templateVM = "TRUE" -------------------------------------------------------------------------------- /labbuildr/template/Nested_ESXi6.0u3_Appliance_Template_v1.0.template: -------------------------------------------------------------------------------- 1 | .encoding = "UTF-8" 2 | displayname = "Nested_ESXi6.0u3_Appliance_Template_v1.0" 3 | annotation = "Nested ESXi 6.0u3 Appliance (Build 5050593)|0D|0Awww.virtuallyghetto.com" 4 | guestos = "other-64" 5 | virtualhw.version = "11" 6 | config.version = "8" 7 | numvcpus = "2" 8 | cpuid.coresPerSocket = "1" 9 | memsize = "6144" 10 | pciBridge0.present = "TRUE" 11 | pciBridge4.present = "TRUE" 12 | pciBridge4.virtualDev = "pcieRootPort" 13 | pciBridge4.functions = "8" 14 | pciBridge5.present = "TRUE" 15 | pciBridge5.virtualDev = "pcieRootPort" 16 | pciBridge5.functions = "8" 17 | pciBridge6.present = "TRUE" 18 | pciBridge6.virtualDev = "pcieRootPort" 19 | pciBridge6.functions = "8" 20 | pciBridge7.present = "TRUE" 21 | pciBridge7.virtualDev = "pcieRootPort" 22 | pciBridge7.functions = "8" 23 | vmci0.present = "TRUE" 24 | floppy0.present = "TRUE" 25 | floppy0.fileType = "device" 26 | floppy0.autodetect = "FALSE" 27 | floppy0.startConnected = "FALSE" 28 | floppy0.clientDevice = "TRUE" 29 | ide1:0.clientDevice = "TRUE" 30 | ide1:0.present = "TRUE" 31 | ide1:0.deviceType = "cdrom-raw" 32 | ide1:0.autodetect = "TRUE" 33 | ide1:0.startConnected = "FALSE" 34 | ide1:0.exclusive = "false" 35 | mks.enable3d = "false" 36 | mks.use3dRenderer = "automatic" 37 | svga.autodetect = "false" 38 | svga.vramSize = "4194304" 39 | scsi0:0.present = "TRUE" 40 | scsi0:0.deviceType = "disk" 41 | scsi0:0.fileName = "Nested_ESXi6.0u3_Appliance_Template_v1.0-disk1.vmdk" 42 | scsi0:0.mode = "persistent" 43 | scsi0:0.writeThrough = "false" 44 | scsi0:1.present = "TRUE" 45 | scsi0:1.deviceType = "disk" 46 | scsi0:1.fileName = "Nested_ESXi6.0u3_Appliance_Template_v1.0-disk2.vmdk" 47 | scsi0:2.present = "TRUE" 48 | scsi0:2.deviceType = "disk" 49 | scsi0:2.fileName = "Nested_ESXi6.0u3_Appliance_Template_v1.0-disk3.vmdk" 50 | scsi0.virtualDev = "lsilogic" 51 | scsi0.present = "TRUE" 52 | vmci0.unrestricted = "false" 53 | vmci0.pciSlotNumber = "192" 54 | ethernet0.present = "TRUE" 55 | ethernet0.virtualDev = "vmxnet3" 56 | ethernet0.connectionType = "bridged" 57 | ethernet0.startConnected = "TRUE" 58 | ethernet0.addressType = "generated" 59 | ethernet0.wakeonpcktrcv = "true" 60 | ethernet1.present = "TRUE" 61 | ethernet1.virtualDev = "vmxnet3" 62 | ethernet1.connectionType = "bridged" 63 | ethernet1.startConnected = "TRUE" 64 | ethernet1.addressType = "generated" 65 | vcpu.hotadd = "false" 66 | vcpu.hotremove = "false" 67 | firmware = "bios" 68 | mem.hotadd = "false" 69 | nestedHVEnabled = "true" 70 | powerType.powerOff = "soft" 71 | powerType.reset = "soft" 72 | powerType.suspend = "hard" 73 | toolscripts.afterpoweron = "true" 74 | toolscripts.afterresume = "true" 75 | toolscripts.beforepoweroff = "true" 76 | toolscripts.beforesuspend = "true" 77 | tools.syncTime = "false" 78 | tools.upgrade.policy = "manual" 79 | chipset.onlineStandby = "FALSE" 80 | sched.cpu.latencySensitivity = "normal" 81 | tools.guest.desktop.autolock = "FALSE" 82 | vmotion.checkpointSVGAPrimarySize = "4194304" 83 | virtualHW.productCompatibility = "hosted" 84 | ethernet1.pciSlotNumber = "192" 85 | disk.enableUUID = "TRUE" 86 | pciBridge6.pciSlotNumber = "23" 87 | scsi0:1.virtualSSD = "1" 88 | checkpoint.vmState.readOnly = "FALSE" 89 | pciBridge4.pciSlotNumber = "21" 90 | hpet0.present = "TRUE" 91 | numa.autosize.cookie = "20001" 92 | monitor.phys_bits_used = "40" 93 | svga.present = "TRUE" 94 | scsi0:2.virtualSSD = "1" 95 | replay.supported = "false" 96 | featMask.vm.hv.capable = "Min:1" 97 | pciBridge7.pciSlotNumber = "24" 98 | ethernet0.filter4.name = "dvfilter-maclearn" 99 | pciBridge0.pciSlotNumber = "17" 100 | ethernet0.pciSlotNumber = "160" 101 | scsi0.pciSlotNumber = "16" 102 | pciBridge5.pciSlotNumber = "22" 103 | softPowerOff = "TRUE" 104 | scsi0:0.virtualSSD = "0" 105 | ethernet0.filter4.onFailure = "failOpen" 106 | toolsInstallManager.updateCounter = "2" 107 | numa.autosize.vcpu.maxPerVirtualNode = "2" 108 | vmotion.checkpointFBSize = "4194304" 109 | ethernet1.filter4.name = "dvfilter-maclearn" 110 | ethernet1.filter4.onFailure = "failOpen" 111 | templateVM = "TRUE" -------------------------------------------------------------------------------- /docs/labbuildr on linux and osx.md: -------------------------------------------------------------------------------- 1 | ## labbuildr Support for LINUX/OSX 2 | with powershell on OSX/LINUX labbuildr will start to support labbuildr on OSX and Linux 3 | this will incude: 4 | * vmxtoolkit 5 | * labbuildr-scripts 6 | * labtools 7 | * labbuildr 8 | 9 | See [LINUX VIDEO](https://www.youtube.com/watch?v=ZjXEVWe9KU4) for a demo 10 | 11 | ## Note: some scenarios require extraction of packages vi EXE files. as they might fail, Labbuiuldr will pause when the Programs are not found from VM´s ( E2013/2010, scom as an example). YOu may need to extraxt then manually from within guest. this will be changed in future by running those jobs from dcnode ! 12 | ![github_osx_powershell_vmxtoolkit](https://cloud.githubusercontent.com/assets/8255007/17848963/c08f8588-6856-11e6-8714-82d50f96dc93.gif) 13 | 14 | ## Requirements on OSX 15 | to run vmxtoolkit on OSX, you need to have 16 | * PowerShell for OSX installed 17 | * .Net Core 18 | * p7zip /rudix 19 | see [PowerShell for OSX](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#os-x-1011) for instructions it is also recommended to install .NET Core for OSX from for details on installation of .NET Core LIBS see [.NET Core on MACOS](https://www.microsoft.com/net/core#macos) 20 | OSX port is currently only available via Git clone, no auto installer 21 | as i decided to use 7zip on all platforms as Primary master Distribution Format, please install p7zip ! 22 | ![image](https://cloud.githubusercontent.com/assets/8255007/18025670/62fe7e7c-6c31-11e6-9972-bbde6aa40d00.png) 23 | i recommend rudix for p7zip 24 | **RUDIX and p7zip** 25 | ```bash 26 | curl -s https://raw.githubusercontent.com/rudix-mac/rpm/2015.10.20/rudix.py | sudo python - install rudix 27 | sudo rudix install p7zip 28 | ``` 29 | 30 | 31 | 32 | ## Requirements on LINUX 33 | to run vmxtoolkit on LINUX, you need to have PowerShell for LINUX installed 34 | see [PowerShell for LINUX](https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md) for instructions 35 | it is also recommended to install .NET Core for OSX from for details on installation of .NET Core LIBS see [.NET Core on LINUX](https://www.microsoft.com/net/core#LINUX) 36 | i also require p7zip, curl and git on your Linux Distribution 37 | Ubuntu 38 | ```bash 39 | sudo apt-get install p7zip-full curl git -y 40 | ``` 41 | LINUX requires the vmnet´s to be configured in VMware Workstation 42 | 43 | Before testing the first scenario you should create your VMnet ( default: VMnet2) with the VMware Virtual Network Editor. Labbuildr is using this net. 44 | When you try to start you first test VM Receive-LABOpenWRT -unzip | Start-VMX 45 | VMware workstation is complaining that it is not possible to set a network adapter to Promiscuous Mode. Below a VMware KB how to fix that. 46 | https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=287#.V-De9Q28qRE.email 47 | 48 | 49 | 50 | ## Install labbuildr on OSX/LINUX 51 | labbuildr on linux/osx can be installed using from PSGallery powershell install-script method 52 | 53 | ```Powershell 54 | install-script install-labbuildr 55 | install-labbuildr.ps1 56 | ``` 57 | 58 | see this video for details [video](https://youtu.be/Dtv3XCUuOgs) 59 | # USAGE 60 | ## Automatic start via profile.ps1 61 | once labbuildr labbuildr must start the labbuildr shell with the included profile.ps1 62 | ```Powershell 63 | powershell 64 | ./profile.ps1 65 | ``` 66 | 67 | 68 | updates can be run by 69 | ```Powershell 70 | ./build-lab.ps1 -update 71 | ``` 72 | 73 | 74 | ## create a launcher icon on (ubuntu) linux 75 | create a file named labbuildr.desktop on your desktop 76 | ``` 77 | touch ~/Desktop/labbuildr.desktop 78 | ``` 79 | edit the file and adjust to you settings: 80 | ``` 81 | [Desktop Entry] 82 | Name=labbuildr 2017 83 | Path=/home/bottk/Downloads/labbuildr 84 | Type=Application 85 | GenericName[en_US]=Powershell 86 | Exec=/usr/bin/powershell -NoExit -command ./profile.ps1 87 | Comment[en_US]=Execute labbuildr 88 | Terminal=true 89 | Icon=/home/bottk/Pictures/labbuildr 90 | ``` 91 | this should generate launcher icon -------------------------------------------------------------------------------- /docs/appendix/Creating_a_Windows_Master.md: -------------------------------------------------------------------------------- 1 | This is an example to create a ( no Preview ) windows master for labbuildr 2 | 3 | ```Powershell 4 | $winserviso = Receive-LABWinservISO -Destination $labdefaults.Sourcedir -winserv_ver 2016 -lang en_US 5 | $newvmx = New-VMX -VMXName 2016_1705 -Type Server2016 -Firmware EFI 6 | $disk = New-VMXScsiDisk -NewDiskSize 200GB -NewDiskname disk0 -Path $newvmx.Path 7 | $disk | Add-VMXScsiDisk -VMXName $newvmx.VMXName -config $newvmx.Config -LUN 0 -Controller 0 -VirtualSSD | Out-Null 8 | $newvmx | Connect-VMXcdromImage -ISOfile $winserviso.fullname -Contoller sata -Port 0:1 | Out-Null 9 | $newvmx | Set-VMXNetworkAdapter -Adapter 0 -AdapterType vmxnet3 -ConnectionType bridged 10 | $newvmx | start-vmx | Out-Null 11 | ``` 12 | 13 | 14 | Download 15 | 16 | ![image](https://user-images.githubusercontent.com/8255007/32428375-a937399c-c2c5-11e7-8fd6-57ad5c289e16.png) 17 | 18 | Install vmware tools with setup64.exe 19 | 20 | Once the master is created, connect to git to download: 21 | ```Powershell 22 | $sysprep = 'C:\sysprep' 23 | New-Item -ItemType Directory $sysprep -Force | Out-Null 24 | Set-Location $sysprep 25 | foreach ($uri in ("https://raw.githubusercontent.com/bottkars/labbuildr-scripts/master/labbuildr-scripts/Sysprep/Server2016.xml", 26 | "https://raw.githubusercontent.com/bottkars/labbuildr-scripts/master/labbuildr-scripts/Sysprep/prepare.ps1")) 27 | { 28 | $file = Split-Path -Leaf $uri 29 | Invoke-WebRequest -Uri $uri -OutFile (Join-Path $sysprep $file) 30 | } 31 | ./prepare.ps1 32 | ``` 33 | 34 | 35 | Once done with teh Master Creation delete all files except the VMDK and vmx, and remove all UUID, Bios and MAC information from the .vmx 36 | ) 37 | 38 | Pack the complete folder into a 7z and place the file into Master.Labbuildr folder. 39 | 40 | Labbuildr will catchup from there 41 | 42 | 43 | 44 | ## Creating a Preview Master 45 | Preview Masters require one initial step 46 | 1. Prepare Base Machine: 47 | ```Powershell 48 | # you have to download the iso file for preview from Server insider 49 | # you have do download the iso file for WS 1709 from MSDN or Volume License 50 | 51 | [System.IO.FileInfo]$winserviso = "$HOME/Downloads/Windows_InsiderPreview_Server_16278.iso" 52 | $Winserv = 'WS_Preview_RS4' 53 | $newvmx = New-VMX -VMXName $Winserv -Type Server2016 -Firmware EFI 54 | $disk = New-VMXScsiDisk -NewDiskSize 200GB -NewDiskname disk0 -Path $newvmx.Path 55 | $disk | Add-VMXScsiDisk -VMXName $newvmx.VMXName -config $newvmx.Config -LUN 0 -Controller 0 -VirtualSSD | Out-Null 56 | $newvmx | Connect-VMXcdromImage -ISOfile $winserviso.fullname -Contoller sata -Port 0:1 | Out-Null 57 | $newvmx | Set-VMXNetworkAdapter -Adapter 0 -AdapterType vmxnet3 -ConnectionType bridged 58 | $newvmx | start-vmx | Out-Null 59 | ``` 60 | 61 | Once host has configured, enter powershell into the cmd shell to start powershell 62 | 63 | once in Powershell, run 64 | ```Powershell 65 | Disable-Ual 66 | ``` 67 | 68 | 2. Inject vmware tools cd, run 69 | 70 | once in Powershell, run 71 | ```Powershell 72 | d:\setup64.exe 73 | ``` 74 | 75 | reboot VM when install has finished. 76 | 77 | Now start Powershell again and Run: 78 | ```Powershell 79 | $sysprep = 'C:\sysprep' 80 | New-Item -ItemType Directory $sysprep -Force | Out-Null 81 | Set-Location $sysprep 82 | foreach ($uri in ("https://raw.githubusercontent.com/bottkars/labbuildr-scripts/master/labbuildr-scripts/Sysprep/Server2016.xml", 83 | "https://raw.githubusercontent.com/bottkars/labbuildr-scripts/master/labbuildr-scripts/Sysprep/WS_INSIDER.xml", 84 | "https://raw.githubusercontent.com/bottkars/labbuildr-scripts/master/labbuildr-scripts/Sysprep/prepare.ps1")) 85 | { 86 | $file = Split-Path -Leaf $uri 87 | Invoke-WebRequest -Uri $uri -OutFile (Join-Path $sysprep $file) 88 | } 89 | 90 | ./prepare.ps1 91 | ``` 92 | 93 | Once done with the Master Creation delete all files except the VMDK and vmx, and remove all UUID, Bios and MAC information fromn the .vmx or use the templates here: 94 | https://raw.githubusercontent.com/bottkars/labbuildr/master/labbuildr/template/WS_Preview_RS4.template 95 | (rename to .vmx) 96 | 97 | 98 | Pack thee complete folder into a 7z and place the file into Master.Labbuildr folder. 99 | 100 | Labbuildr will catchup from there -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | *.pssproj 5 | *.pssproj.* 6 | *.sln 7 | .vs 8 | ./.vs 9 | *.pydevproject 10 | .project 11 | .metadata 12 | bin/ 13 | tmp/ 14 | *.tmp 15 | *.bak 16 | *.swp 17 | *~.nib 18 | local.properties 19 | .classpath 20 | .settings/ 21 | .loadpath 22 | 23 | # External tool builders 24 | .externalToolBuilders/ 25 | 26 | # Locally stored "Eclipse launch configurations" 27 | *.launch 28 | 29 | # CDT-specific 30 | .cproject 31 | 32 | # PDT-specific 33 | .buildpath 34 | 35 | 36 | ################# 37 | ## Visual Studio 38 | ################# 39 | 40 | ## Ignore Visual Studio temporary files, build results, and 41 | ## files generated by popular Visual Studio add-ons. 42 | 43 | # User-specific files 44 | *.suo 45 | *.user 46 | *.sln.docstates 47 | 48 | # Build results 49 | 50 | [Dd]ebug/ 51 | [Rr]elease/ 52 | x64/ 53 | build/ 54 | [Bb]in/ 55 | [Oo]bj/ 56 | 57 | # MSTest test Results 58 | [Tt]est[Rr]esult*/ 59 | [Bb]uild[Ll]og.* 60 | 61 | *_i.c 62 | *_p.c 63 | *.ilk 64 | *.meta 65 | *.obj 66 | *.pch 67 | *.pdb 68 | *.pgc 69 | *.pgd 70 | *.rsp 71 | *.sbr 72 | *.tlb 73 | *.tli 74 | *.tlh 75 | *.tmp 76 | *.tmp_proj 77 | *.log 78 | *.vspscc 79 | *.vssscc 80 | .builds 81 | *.pidb 82 | *.log 83 | *.scc 84 | 85 | # Visual C++ cache files 86 | ipch/ 87 | *.aps 88 | *.ncb 89 | *.opensdf 90 | *.sdf 91 | *.cachefile 92 | 93 | # Visual Studio profiler 94 | *.psess 95 | *.vsp 96 | *.vspx 97 | 98 | # Guidance Automation Toolkit 99 | *.gpState 100 | 101 | # ReSharper is a .NET coding add-in 102 | _ReSharper*/ 103 | *.[Rr]e[Ss]harper 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | *.ncrunch* 113 | .*crunch*.local.xml 114 | 115 | # Installshield output folder 116 | [Ee]xpress/ 117 | 118 | # DocProject is a documentation generator add-in 119 | DocProject/buildhelp/ 120 | DocProject/Help/*.HxT 121 | DocProject/Help/*.HxC 122 | DocProject/Help/*.hhc 123 | DocProject/Help/*.hhk 124 | DocProject/Help/*.hhp 125 | DocProject/Help/Html2 126 | DocProject/Help/html 127 | 128 | # Click-Once directory 129 | publish/ 130 | 131 | # Publish Web Output 132 | *.Publish.xml 133 | *.pubxml 134 | 135 | # NuGet Packages Directory 136 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 137 | #packages/ 138 | 139 | # Windows Azure Build Output 140 | csx 141 | *.build.csdef 142 | 143 | # Windows Store app package directory 144 | AppPackages/ 145 | 146 | # Others 147 | 148 | *.Cache 149 | ClientBin/ 150 | [Ss]tyle[Cc]op.* 151 | ~$* 152 | *~ 153 | *.dbmdl 154 | *.[Pp]ublish.xml 155 | *.pfx 156 | *.publishsettings 157 | 158 | # RIA/Silverlight projects 159 | Generated_Code/ 160 | 161 | # Backup & report files from converting an old project file to a newer 162 | # Visual Studio version. Backup files are not needed, because we have git ;-) 163 | _UpgradeReport_Files/ 164 | Backup*/ 165 | UpgradeLog*.XML 166 | UpgradeLog*.htm 167 | 168 | # SQL Server files 169 | App_Data/*.mdf 170 | App_Data/*.ldf 171 | 172 | ############# 173 | ## Windows detritus 174 | ############# 175 | 176 | # Windows image file caches 177 | Thumbs.db 178 | ehthumbs.db 179 | 180 | # Folder config file 181 | Desktop.ini 182 | 183 | # Recycle Bin used on file shares 184 | $RECYCLE.BIN/ 185 | 186 | # Mac crap 187 | .DS_Store 188 | 189 | 190 | ############# 191 | ## Python 192 | ############# 193 | 194 | *.py[co] 195 | 196 | # Packages 197 | *.egg 198 | *.egg-info 199 | dist/ 200 | build/ 201 | eggs/ 202 | parts/ 203 | var/ 204 | sdist/ 205 | develop-eggs/ 206 | .installed.cfg 207 | 208 | # Installer logs 209 | pip-log.txt 210 | 211 | # Unit test / coverage reports 212 | .coverage 213 | .tox 214 | 215 | #Translations 216 | *.mo 217 | 218 | #Mr Developer 219 | .mr.developer.cfg 220 | #/vmxtoolkit 221 | *.zip 222 | /AAGNODE* 223 | /E2013* 224 | /NWSERVER 225 | /WRITE-ASCII 226 | /DCNODE 227 | /DISKS 228 | /ONEFS* 229 | /log4net 230 | /ONEFS* 231 | *.vmdk 232 | *.vmx 233 | *.vmxf 234 | /*MASTER* 235 | /ip.txt 236 | /dns.txt 237 | /domain.txt 238 | /default.xml 239 | /labbuildr.version 240 | Gateway.txt 241 | sources.vhd 242 | version.labbuildr 243 | defaults.json 244 | diskpart.txt 245 | /ISI* 246 | /HVN* 247 | /Node* 248 | /SOF* 249 | /b.* 250 | /ScaleION* 251 | /Scaleiovm* 252 | /98* 253 | iso/ 254 | *.exe 255 | *.msi 256 | *.msu 257 | W81* 258 | DiscUtilsBin-0.10/ 259 | ESXiNode* 260 | VMware ESXi 5/ 261 | *.version 262 | *.pass 263 | 2012* 264 | Panorama 265 | /release* 266 | error.txt 267 | /AVE* 268 | /EMC* 269 | bash.ps1 270 | /_dev 271 | /Cloud* 272 | CloudArray-ESXi5-5.0.1.6497/CloudArray-ESXi5-5.0.1.6497-Snapshot1.vmsn 273 | *.vmsd 274 | *.vmem 275 | *.vmss 276 | *.nvram 277 | *.pssproj 278 | -------------------------------------------------------------------------------- /docs/appendix/common_docker_registry.md: -------------------------------------------------------------------------------- 1 | ## how to build a docker registry for windows an linux 2 | 3 | ### using: docker registry on photon os 4 | 5 | ##### requires : docker registry 2.5 or later ( using 2.61 in this example ) 6 | ##### requires : docker daemon on windows, minimum 17.06 7 | 8 | ### Setup: 9 | install a docker host for your registry. in my example, i deploy a docker registry on a Photon Containerhost 10 | for labbuildr, you can use use the command: 11 | ```Powershell 12 | .\install-photon.ps1 -docker_registry 13 | ``` 14 | 15 | this will 16 | - install latest phopton os 17 | - pull docker-registry latest 18 | if you install manually, here is an example docker compose: 19 | 20 | ```yaml 21 | - path: /root/docker-compose.yml 22 | content: | 23 | registry: 24 | restart: always 25 | image: registry:latest 26 | ports: 27 | - 5000:5000 28 | volumes: 29 | - /data:/var/lib/registry 30 | ``` 31 | 32 | you can build your registry manually by 33 | 34 | ``` 35 | /usr/bin/docker-compose -f /root/docker-compose.yml up -d 36 | ``` 37 | ![image](https://user-images.githubusercontent.com/8255007/27326254-4803f9ee-55ab-11e7-84cf-73a0a9eeb735.png) 38 | the registry in this example uses /data dockervolume, a mountpoint for sdb1 in my case 39 | 40 | to make Docker Windows able to push images to the linux registry, the allow-nondistributable-artifacts must be set in 41 | c:\programdata\docker\config\daemon.json 42 | insecure registry is also defined in that by insecure-registries directive 43 | example 44 | ```json 45 | { 46 | "insecure-registries":["192.168.2.40:5000"], 47 | "allow-nondistributable-artifacts": ["192.168.2.40:5000"] 48 | } 49 | ``` 50 | When using labbuildr a windows dockerhost can be automatically brought online by running: 51 | 52 | ```Powershell 53 | .\build-lab.ps1 -Master 2016core -docker -Size xl -defaults 54 | ``` 55 | 56 | modifications for the private registry and nondistributable artifacts are made automatically then. 57 | #### verify 58 | run docker info to verify setings and versions on your windows host 59 | ```Powershell 60 | docker info 61 | ``` 62 | ![image](https://user-images.githubusercontent.com/8255007/27322624-182bb3d0-559f-11e7-8280-cfed52ec2bc6.png) 63 | 64 | #### test 65 | 66 | to download a windows based image from the docker hub, run 67 | docker pull 68 | in this example i used microsoft sql server, as the size was the original reason to build this :-) 69 | ``` 70 | docker pull microsoft/mssql-server-windows 71 | ``` 72 | ![image](https://user-images.githubusercontent.com/8255007/27322680-492cf660-559f-11e7-9ee4-db88ade0c121.png) 73 | 74 | once download is complete, we tag the image with the local registry name/ip: 75 | ``` 76 | docker tag microsoft/mssql-server-windows:latest 192.168.2.40:5000/microsoft/mssql-server-windows:latest 77 | ``` 78 | and push it to the local registry 79 | ``` 80 | docker push 192.168.2.40:5000/microsoft/mssql-server-windows:latest 81 | ``` 82 | 83 | ![image](https://user-images.githubusercontent.com/8255007/27324683-3ee90c0a-55a6-11e7-8428-bb70b1df3632.png) 84 | we can now ask the registry for the catalog by 85 | ``` 86 | Invoke-RestMethod http://192.168.2.40:5000/v2/_catalog | Select-Object -ExpandProperty repositories 87 | ``` 88 | ![image](https://user-images.githubusercontent.com/8255007/27326026-8ce55388-55aa-11e7-9614-bb7f7f0daa2c.png) 89 | 90 | 91 | 92 | on a second docker windows host, we verify the image by pulling it 93 | ```Powershell 94 | docker pull 192.168.2.40:5000/microsoft/mssql-server-windows:latest 95 | ``` 96 | ![image](https://user-images.githubusercontent.com/8255007/27325356-731643f6-55a8-11e7-902c-4b753b1d7124.png) 97 | 98 | you will notice a faster download speed now as you refer to your local repo 99 | 100 | 101 | ## config.yml ecample for ECS 102 | version: 0.1 103 | log: 104 | fields: 105 | service: registry 106 | storage: 107 | cache: 108 | blobdescriptor: inmemory 109 | s3: 110 | accesskey: docker 111 | secretkey: TQMDSwwf5KFN+rSJVI89TOI8Rc1cz4CxrREajdk6 112 | region: Standard 113 | regionendpoint: http://192.168.2.245:9020 114 | bucket: registry 115 | encrypt: false 116 | chunksize: 5242880 117 | multipartcopychunksize: 33554432 118 | multipartcopymaxconcurrency: 100 119 | multipartcopythresholdsize: 33554432 120 | http: 121 | addr: :5000 122 | headers: 123 | X-Content-Type-Options: [nosniff] 124 | health: 125 | storagedriver: 126 | enabled: true 127 | interval: 10s 128 | threshold: 3 129 | -------------------------------------------------------------------------------- /labbuildr/profile.ps1: -------------------------------------------------------------------------------- 1 | <#$Userinterface = (Get-Host).UI.RawUI 2 | $Userinterface.BackgroundColor = "Black" 3 | $Userinterface.ForegroundColor = "Green" 4 | $size = $Userinterface.BufferSize 5 | $size.width=130 6 | $size.height=5000 7 | $Userinterface.BufferSize = $size 8 | $size = $Userinterface.WindowSize 9 | $size.width=120 10 | $size.height=36 11 | $Userinterface.WindowSize = $size 12 | #> 13 | param( 14 | $defaultsfile = "./defaults.json", 15 | [switch]$noopenwrt 16 | ) 17 | if ($vmxtoolkit_type -eq "win_x86_64") 18 | { 19 | $labbuildr_home = $env:USERPROFILE 20 | } 21 | else 22 | { 23 | $labbuildr_home = $HOME 24 | } 25 | clear-host 26 | $self = Get-Location 27 | import-module (Join-Path $self "vmxtoolkit") -Force -ArgumentList $self 28 | import-module (Join-Path $self "labtools") -Force 29 | try 30 | { 31 | Get-ChildItem labbuildr-scripts -ErrorAction Stop | Out-Null 32 | } 33 | catch 34 | [System.Management.Automation.ItemNotFoundException] 35 | { 36 | Write-Warning -InformationAction Stop "labbuildr-scripts not found, need to move scripts folder" 37 | try 38 | { 39 | Write-Host -ForegroundColor Gray " ==> moving Scripts to labbuildr-scripts" 40 | Move-Item -Path Scripts -Destination labbuildr-scripts -ErrorAction Stop 41 | } 42 | catch 43 | { 44 | Write-Warning "could not move old scripts folder, incomlete installation ?" 45 | exit 46 | } 47 | } 48 | 49 | try 50 | { 51 | Get-ChildItem $defaultsfile -ErrorAction Stop | Out-Null 52 | } 53 | catch 54 | [System.Management.Automation.ItemNotFoundException] 55 | { 56 | Write-Host -ForegroundColor Yellow "no defaults.json found, using labbuildr default settings" 57 | New-LABdefaults -Defaultsfile $defaultsfile 58 | # $Master_path = Join-Path $labbuildr_home "Master.labbuildr" 59 | # $Source_path = Join-Path $labbuildr_home "Sources.labbuildr" 60 | # Set-LABMasterpath -Masterpath $Master_path.tostring() #| Out-Null 61 | # Set-LABSources -Sourcedir $Source_path.tostring() #| Out-Null 62 | } 63 | $global:labdefaults = Get-LABDefaults 64 | if (!$global:labdefaults.Masterpath) 65 | { 66 | Set-LABMasterpath -Masterpath (Join-Path $labbuildr_home "Master.labbuildr").tostring() | Out-Null 67 | } 68 | if (!$global:labdefaults.Sourcedir) 69 | { 70 | Set-LABSources -Sourcedir (Join-Path $labbuildr_home "Sources.labbuildr").tostring() | Out-Null 71 | } 72 | if ($global:labdefaults.SQLVER -notmatch 'ISO') 73 | { 74 | Set-LABSQLver -SQLVER SQL2014SP2_ISO | Out-Null 75 | } 76 | If (!$global:labdefaults.Masterpath) 77 | { 78 | $Master_path = Join-Path $labbuildr_home "Master.labbuildr" 79 | Set-LABMasterpath -Masterpath $Master_path.tostring() #| Out-null 80 | } 81 | If (!$global:labdefaults.Sourcedir) 82 | { 83 | $Source_path = Join-Path $labbuildr_home "Sources.labbuildr" 84 | Set-LABSources -Sourcedir $Source_path.tostring() #| Out-Null 85 | } 86 | If (!$global:labdefaults.NoDomainCheck) 87 | { 88 | Set-LABNoDomainCheck -enabled:$false | out-null 89 | } 90 | 91 | <#write-host -ForegroundColor Yellow "Running VMware $vmwareversion" 92 | if (!(Test-Connection community.emc.com -Quiet -Count 2 -ErrorAction SilentlyContinue)) 93 | { 94 | Write-Warning "no Internet Connection detected or on EMC Net, Download of Sources may not work" 95 | } 96 | else 97 | { 98 | Write-host "latest updates on vmxtoolkit and labbuildr" 99 | $Url = "https://community.emc.com/blogs/bottk/feeds/posts" 100 | $blog = [xml](new-object System.Net.WebClient).DownloadString($Url) 101 | $blog.rss.channel.item | where {$_.title -match "vmxtoolkit" -or $_.title -Match "labbuildr"} |select Link | ft 102 | }#> 103 | 104 | if ($global:labdefaults.Languagetag -match "_") 105 | { 106 | $global:labdefaults.Languagetag = $global:labdefaults.Languagetag -replace "_","-" 107 | save-labdefaults -defaults $global:labdefaults | Out-Null 108 | } 109 | if (!$global:labdefaults.timezone) 110 | { 111 | Set-Labtimezone | out-null 112 | } 113 | if ($noopenwrt.IsPresent) 114 | { 115 | Set-LABOpenWRT -enabled:$false 116 | } 117 | if (!$global:labdefaults.openwrt) 118 | { 119 | Write-Host -ForegroundColor Yellow "==> Running labbuildr without OpenWRT, know what you do !" 120 | } 121 | else 122 | { 123 | if (!($openwrt = get-vmx OpenWRT* -WarningAction SilentlyContinue) -and !($global:labdefaults.openwrt -eq "false")) 124 | { 125 | Receive-LABOpenWRT -start | Out-Null 126 | } 127 | else 128 | { 129 | if (($openwrt.status) -notmatch "running") 130 | { 131 | $openwrt[-1] | Start-VMX -nowait | Out-Null 132 | } 133 | } 134 | } 135 | $buildlab = (join-path $self "build-lab.ps1") 136 | .$buildlab 137 | Set-LabUI 138 | Get-VMX 139 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-unity-falcon.ps1.md: -------------------------------------------------------------------------------- 1 | # about 2 | 3 | install-unity-falcon.ps1 deploys a DELL|EMC Unity VSA on VMware Workstation. 4 | it is a fully automated process. 5 | the process changed from a pre-falocn release, as the ova deployment has some changes. to iplement theese changes, som teaks have to be made by the installer: 6 | 7 | * unity needs to run pvscsi devices 8 | * only system disks are allowed at system boot time 9 | * uuid has changed from a SP uuid to a system UUID ( randomly changed with every deployment ), so a license file can not be re-used as the first byte changes with every deployment of the same machine: 10 | ![image](https://cloud.githubusercontent.com/assets/8255007/24233381/28992642-0f92-11e7-9cf5-45e759324d33.png) 11 | 12 | the changes requires a Change in the deployment process to invoke at least one **shutdown - reconfig** and a **injection of the lic_file from a "drop-in" directory** ( only if you want to autoconfigure luns, iscsi and fileservices ) 13 | 14 | # Import 15 | to start a unity deployment, we have to initially Import the ova. simply run 16 | 17 | ```Powershell 18 | .\install-unity-falcon.ps1 -ovf C:\Downloads\UnityVSA-4.1.0.9058043.ova 19 | ``` 20 | 21 | where you have to replace the ovf with your downloaded Version 22 | 23 | # Deploy 24 | 25 | there are multiple options to deploy unity. 26 | 27 | * base deployment ( no license required, all config done vi web ui) 28 | 29 | ````Powershell 30 | .\install-unity-falcon.ps1 -Masterpath C:\Users\KarstenBottlabbuildr\Master.labbuildr -Mastername UnityVSA-4.1.1* -configure -Defaults 31 | ```` 32 | * a full flavored unity including join to an active directory can be done with: 33 | 34 | ````Powershell 35 | .\install-unity-falcon.ps1 -Masterpath C:\Users\KarstenBottlabbuildr\Master.labbuildr -Mastername UnityVSA-4.1.1* -configure -Defaults -lic_dir C:\labbuildr2017\ -Protocols cifs, 36 | iscsi,nfs -Disks 6 -iscsi_hosts all 37 | ```` 38 | 39 | ### used switches 40 | * **lic_dir** drop-in directory fo the licence we have to download once we get the system uuid upon first reboot 41 | * **Masterpath** directory where the master was deployed from the ova 42 | * **Mastername** name of the master to be picked 43 | * **configure** do a base configuration 44 | * **Protocols** if lic_dir is present, the provided protocols are deployed 45 | 46 | the workflow starts with the deployment and first boot of the unity System. 47 | the first boot may take up to 10 minutes ( a lot of checks, key generation and image copies are taking place ) 48 | 49 | image of step1 imaging on console: 50 | ![image](https://cloud.githubusercontent.com/assets/8255007/24233063/e5886bd0-0f8f-11e7-932a-948687105842.png) 51 | 52 | image of powershell output on step1 53 | ![image](https://cloud.githubusercontent.com/assets/8255007/24214548/24c009b6-0f36-11e7-9fa0-9956beee042f.png) 54 | 55 | once the system imaging is done and the system Management os has booted, the runtime Services are configured. 56 | this is a 27 step process 57 | you may also watch the 27 steps in the VM´s console: 58 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215091/f09b74de-0f37-11e7-981d-a6cbf7a21832.png) 59 | ip-addresses will be configured once step 27 is reached. 60 | 61 | 62 | once the first deployment Phase reached System ready, the System uuid is presented and the System reboots. Copy the UUID and paste it in https://www.emc.com/auth/elmeval.htm to get your license. 63 | 64 | 65 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215489/37da7132-0f39-11e7-9aff-7cb933466957.png) 66 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215511/4f5b50c4-0f39-11e7-8f7a-c5c4d6263b80.png) 67 | 68 | download the license and copy the file into the drop-in Directory specified with -lic_dir 69 | 70 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215553/6f53b2c2-0f39-11e7-8d16-c1fd9344fa9b.png) 71 | 72 | The System will do a second boot now and start the configuration of the System: 73 | 74 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215815/42a05a86-0f3a-11e7-88a2-0fab488965eb.png) 75 | 76 | if you have not already presented a license file, the installer will wait for you and check the drop-in dir until the file is present. note: do not rename the file upon save or copy, as the installer watches for the uuid in the Name. 77 | 78 | once the license file is found, the System customization starts with the selected protocols: 79 | 80 | ![image](https://cloud.githubusercontent.com/assets/8255007/24215875/820386e4-0f3a-11e7-8686-d298f4f50227.png) 81 | 82 | if cifs needs to be configured, a second reboot might be required for the NTP adjustment 83 | 84 | ![image](https://cloud.githubusercontent.com/assets/8255007/24236851/fa3d5d38-0fa3-11e7-9ec8-27425115529c.png) 85 | 86 | # final views 87 | These samples are an example representing the full config done by labbuildr 88 | ![image](https://cloud.githubusercontent.com/assets/8255007/24232876/4c6b0788-0f8e-11e7-808e-4118af2f38be.png) 89 | 90 | ![image](https://cloud.githubusercontent.com/assets/8255007/24236899/3fe076fe-0fa4-11e7-998c-ff497bf1fbfa.png) 91 | 92 | ![image](https://cloud.githubusercontent.com/assets/8255007/24236918/5eb5ef64-0fa4-11e7-9753-6ccde94b8a07.png) 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-centos4viprsrm.md: -------------------------------------------------------------------------------- 1 | I have a recurring task where I need a bunch of Linux VMs to do a distributed binary install of ViPR SRM on them. 2 | I solved this with yet another wrapper script using the install_centos.ps1. 3 | 4 | It can install, start, stop and remove VMs for distributed and all-in-one setups. 5 | You will find your install sources mounted under /mnt/SRMshare (providing you tweak the script to your system) 6 | 7 | The challenge for me was getting different sizes on the VMs and having the prereqs for SRM install present. 8 | 9 | Update: Installed ViPR SRM 4.0.1 on this setup. 10 | 4.0.1 by default installs the health collectors on all hosts. 11 | Thus, increase memory for the two backends (viprsrm1 and 2) to 2 GB. 12 | 13 | ```` 14 | # Setup one or many Linux boxes to install ViPR SRM on 15 | # 16 | 17 | param ( 18 | <# 19 | Can be one of the following: 20 | 'aio' Setup one Centos for All-In-One installation 21 | 'distrib' Setup four Centos for distributed install: 22 | viprsrm0 - XL - Frontend 23 | viprsrm1 - L - Prim Backend 24 | viprsrm2 - L - Additional Backend 25 | viprsrm3 - XL - Collector 26 | #> 27 | [ValidateSet('aio','distrib','nothing')]$Type="nothing", 28 | [ValidateSet('remove','install','fixme','start','stop','none')]$Action="none" 29 | ); 30 | 31 | function Wait-VMXStatus 32 | { 33 | param( 34 | [Parameter(Mandatory=$true)][object]$vmx, 35 | [Parameter(Mandatory=$true)][string]$state 36 | ) 37 | $vmx_act=Get-VMX -vmxname $vmx.vmxname 38 | do 39 | { 40 | $vmx_act=Get-VMX -vmxname $vmx.vmxname 41 | $vmxname=$vmx_act.vmxname 42 | $vmxstate=$vmx_act.state 43 | write-output "VM $vmxname is in state of $vmxstate, waiting for it to be $state" 44 | sleep 5 45 | } 46 | while ($vmx_act.state -NotMatch $state) 47 | } 48 | 49 | if($Type -eq 'nothing') 50 | { 51 | write-output "choose an install type (aio or distrib)" 52 | exit 1 53 | } 54 | if($Action -eq 'none') 55 | { 56 | write-output "choose an action: start/stop/install/remove" 57 | exit 1 58 | } 59 | 60 | if($Action -eq 'start') 61 | { 62 | if($Type -eq 'distrib') 63 | { 64 | get-vmx|where vmxname -like "viprsrm?" | start-vmx 65 | } 66 | if($Type -eq 'aio') 67 | { 68 | get-vmx|where vmxname -match viprsrmaio0| start-vmx 69 | } 70 | # we don't want to install the thing 71 | exit 0 72 | } 73 | 74 | if($Action -eq 'stop') 75 | { 76 | if($Type -eq 'distrib') 77 | { 78 | get-vmx|where vmxname -like "viprsrm?" | stop-vmx 79 | } 80 | if($Type -eq 'aio') 81 | { 82 | get-vmx|where vmxname -match viprsrmaio0| stop-vmx 83 | } 84 | # we don't want to install the thing 85 | exit 0 86 | } 87 | 88 | if($Action -eq 'install') 89 | { 90 | if($Type -eq 'aio') 91 | { 92 | ./install-centos.ps1 -Defaults -centos_ver 7_1_1511 -Nodeprefix viprsrmaio -ip_startrange 99 -startnode 0 -nodes 1 -size XL 93 | $vm=get-vmx | where vmxname -eq viprsrmaio0 94 | $vm|stop-vmx 95 | Wait-VMXStatus -vmx $vm -state "stopped" 96 | $vm|set-vmxmemory -MemoryMB 6144 97 | $vm | start-vmx 98 | Wait-VMXStatus -vmx $vm -state "running" 99 | $vm|Set-VMXSharedFolder -add -Sharename SRMShare -Folder C:\Users\schnem4\Documents\70-Software\SRM_W4N 100 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "yes|yum install unzip libaio bindutils" 101 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "rm /etc/localtime;ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime" 102 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "/usr/bin/vmware-toolbox-cmd timesync enable" 103 | } 104 | 105 | if($Type -eq 'distrib') 106 | { 107 | ./install-centos.ps1 -Defaults -centos_ver 7_1_1511 -Nodeprefix viprsrm -ip_startrange 110 -startnode 0 -nodes 4 -size M 108 | for($i=0;$i -le 3;$i++) 109 | { 110 | $vm = get-vmx | where vmxname -eq viprsrm$i 111 | if( ($i -eq 0) -or ($i -eq 3) ) 112 | { 113 | $vm | stop-vmx 114 | Wait-VMXStatus -vmx $vm -state "stopped" 115 | $vm = get-vmx | where vmxname -eq viprsrm$i 116 | $vm |set-vmxmemory -MemoryMB 4096 117 | $vm | start-vmx 118 | Wait-VMXStatus -vmx $vm -state "running" 119 | } 120 | $vm | Set-VMXSharedFolder -add -Sharename SRMShare -Folder C:\Users\schnem4\Documents\70-Software\SRM_W4N 121 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "yes|yum install unzip libaio bindutils" 122 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "rm /etc/localtime;ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime" 123 | $vm | Invoke-VMXBash -Guestuser root -Guestpassword Password123! -Scriptblock "/usr/bin/vmware-toolbox-cmd timesync enable" 124 | } 125 | } 126 | } 127 | 128 | if($Action -eq 'remove') 129 | { 130 | if($Type -eq 'aio') 131 | { 132 | $vm=get-vmx | where vmxname -eq viprsrmaio0 133 | $vm | stop-vmx 134 | $vm | remove-vmx 135 | } 136 | if($Type -eq 'distrib') 137 | { 138 | for($i=0;$i -le 3;$i++) 139 | { 140 | $vm = get-vmx | where vmxname -eq viprsrm$i 141 | $vm | stop-vmx 142 | $vm | remove-vmx 143 | } 144 | } 145 | } 146 | 147 | if($Action -eq 'fixme') 148 | { 149 | } 150 | ```` 151 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-cloudarray.ps1.md: -------------------------------------------------------------------------------- 1 | ##install-clpoudarray.ps1 2 | 3 | cloudarray installation also follows labbuildr´s two step process: 4 | * import ova as template 5 | * deploy from template 6 | 7 | ## import 8 | to get your copy and license for cloudarray, contact https://cloudarray.com 9 | to import cloudarray ova, use 10 | ```Powershell 11 | .\install-cloudarray.ps1 -ovf C:\Users\bottk\Downloads\CloudArray_ESXi5_7.0.6.0.8713\CloudArray_ESXi5_7.0. 12 | 6.0.8713.ovf 13 | ``` 14 | 15 | the import will present you the default CloudArray installation Option once finished 16 | ![image](https://cloud.githubusercontent.com/assets/8255007/18385999/35c640bc-7694-11e6-8148-1cb4d463af57.png) 17 | 18 | ##installation 19 | to install cloudarray using 3 Cache Volumes, use 20 | 21 | ```Powershell 22 | .\install-cloudarray.ps1 -Defaults -MasterPath [you masterpath]\CloudArray_ESXi5_7.0.6.0.8713\ -Cachevols 3 -Cachevolsize 146GB 23 | ``` 24 | this will create a new cloudarray instance with 3 Cachevolumes 25 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386070/b0ba18d4-7694-11e6-9b0b-35286627fbe4.png) 26 | 27 | 28 | proceed to the vm console 29 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386144/35b44212-7695-11e6-8de9-6052aff852fe.png) 30 | 31 | login with admin password 32 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386185/890802e6-7695-11e6-92f4-8d7e4177f479.png) 33 | 34 | you will be promptet to change your password 35 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386236/d9a3aa20-7695-11e6-9951-0c51907a6e7d.png) 36 | 37 | proceed with network configuration 38 | 39 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386289/4a25c440-7696-11e6-8a91-101b553d782c.png) 40 | 41 | fill in your dns and gateway config 42 | 43 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386327/a0cd93b8-7696-11e6-8723-0a37c88bd3fd.png) 44 | 45 | and enter defaults for your primary nic 46 | 47 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386346/c91d920a-7696-11e6-87fd-1904335cc1d0.png) 48 | 49 | 50 | save twice and continue configuration using the web ui. 51 | 52 | click on setup to start configuration 53 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386408/2c675a58-7697-11e6-99c1-cf8bc41c2f81.png) 54 | 55 | make sure to have your cloudprovider and cloudportal credentials 56 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386447/7c7c93b4-7697-11e6-88a4-bf9d251a847a.png) 57 | 58 | leave cloudportal enabled ( this will give you a free trial account for google storage ) 59 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386461/9ff99e54-7697-11e6-96f9-7c39aad7ccb3.png) 60 | 61 | enter your cloudportal details and license tag 62 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386503/e2763ee0-7697-11e6-9fa9-790f90a4e1cd.png) 63 | 64 | create and Administrator Account 65 | ![image](https://cloud.githubusercontent.com/assets/8255007/18429956/991d32a8-78d6-11e6-83cf-f24b9d0e249e.png) 66 | 67 | and accept the eula ( scroll down ) 68 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386587/416de150-7698-11e6-90a2-8995304fa8a4.png) 69 | 70 | start the configuration wizard 71 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386621/608e4962-7698-11e6-80b1-3a09afe4a976.png) 72 | 73 | skip the managed cloud provider if you do not want to use google 74 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386652/95905646-7698-11e6-8fc1-33fd0a9d0fa5.png) 75 | 76 | ## Configure EMC ECS 77 | select EMC ViPR as the cloud provider 78 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386683/c7c5c7b8-7698-11e6-9c64-926873bf1035.png) 79 | 80 | enter your ecs details: 81 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386780/64caf68c-7699-11e6-9f3a-e26cc988fbb0.png) 82 | 83 | confirm your Bandwith 84 | ![image](https://cloud.githubusercontent.com/assets/8255007/18433012/7f3b95dc-78e5-11e6-81ec-a1576a7dc267.png) 85 | 86 | and select your Cache Volume: 87 | ![image](https://cloud.githubusercontent.com/assets/8255007/18433056/c8cf2588-78e5-11e6-817e-d756d07441a4.png) 88 | 89 | 90 | the provider is configured for now 91 | ![image](https://cloud.githubusercontent.com/assets/8255007/18433078/f51e31ec-78e5-11e6-8914-1a31a49d52bb.png) 92 | 93 | 94 | ## tips 95 | 96 | * set ntp servers to a valid value ! 97 | the pre-configured ntp server can not be used. use one of pooled dns server addresses 98 | ![image](https://cloud.githubusercontent.com/assets/8255007/18430073/3bdb9192-78d7-11e6-8a94-e826afe8a8eb.png) 99 | 100 | * if your ECS uses self-signed certificates, you will receive the following message 101 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386803/7cb60d18-7699-11e6-87e7-fd1bda179927.png) 102 | 103 | in that case, open a new cloudarray tab end go user interface --> Administration --> utilities 104 | and enter the following code in the execute cli window 105 | ```bash 106 | set_option disable_cloud_certs --disable true 107 | ``` 108 | ![image](https://cloud.githubusercontent.com/assets/8255007/18386952/060ef160-769a-11e6-95d5-e246f59e2bdb.png) 109 | 110 | * for provider setting examples ( ecs ) see 111 | https://community.emc.com/blogs/bottk/2016/01/24/using-the-emc-elastic-cloud-storage-with-emc-software-and-appliances-part1-cloudarray 112 | 113 | * If you retrieve access denied from ECS, it might be that your BASE URL in ECS is not configured correctly: 114 | ![image](https://cloud.githubusercontent.com/assets/8255007/18433282/f8a10f1e-78e6-11e6-9907-bca28651c9c3.png) 115 | 116 | 117 | -------------------------------------------------------------------------------- /labbuildr/install-ansible.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-scaleio.ps1 4 | .DESCRIPTION 5 | install-centos7_4scaleio is the a vmxtoolkit solutionpack for configuring and deploying centos VM´s for ScaleIO Implementation 6 | 7 | Copyright 2014 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-ansible.ps1 22 | .EXAMPLE 23 | #> 24 | [CmdletBinding(DefaultParametersetName = "install", 25 | SupportsShouldProcess=$true, 26 | ConfirmImpact="Medium")] 27 | Param( 28 | [Parameter(ParameterSetName = "install",Mandatory=$False)] 29 | [ValidateRange(1,3)] 30 | [int32]$Disks = 1, 31 | [Parameter(ParameterSetName = "install",Mandatory = $false)] 32 | [ValidateSet('Centos7_3_1611','Centos7_1_1511','Centos7_1_1503')] 33 | [string]$centos_ver = 'Centos7_3_1611', 34 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 35 | [ValidateRange(1,1)] 36 | [int32]$Nodes=1, 37 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 38 | [int32]$Startnode = 1, 39 | [int]$ip_startrange = 248, 40 | <# 41 | Size 42 | 'XS' = 1vCPU, 512MB 43 | 'S' = 1vCPU, 768MB 44 | 'M' = 1vCPU, 1024MB 45 | 'L' = 2vCPU, 2048MB 46 | 'XL' = 2vCPU, 4096MB 47 | 'TXL' = 4vCPU, 6144MB 48 | 'XXL' = 4vCPU, 8192MB 49 | #> 50 | [ValidateSet('XS', 'S', 'M', 'L', 'XL','TXL','XXL')]$Size = "XL", 51 | $Nodeprefix = "ansible", 52 | $DNS_DOMAIN_NAME = "$($Global:labdefaults.BuildDomain).$($Global:labdefaults.Custom_DomainSuffix)", 53 | [switch]$Defaults 54 | ) 55 | #requires -version 3.0 56 | #requires -module vmxtoolkit 57 | if ($Defaults.IsPresent) 58 | { 59 | Deny-LABDefaults 60 | Break 61 | } 62 | $Logfile = "/tmp/labbuildr.log" 63 | If ($ConfirmPreference -match "none") 64 | {$Confirm = $false} 65 | else 66 | {$Confirm = $true} 67 | $Builddir = $PSScriptRoot 68 | $Scriptdir = Join-Path $Builddir "labbuildr-scripts" 69 | $ip_startrange = $ip_startrange+$Startnode 70 | $OS = "Centos" 71 | [System.Version]$subnet = $Global:labdefaults.MySubnet 72 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 73 | $rootuser = "root" 74 | $Guestpassword = "Password123!" 75 | $Guestuser = 'labbuildr' 76 | [uint64]$Disksize = 100GB 77 | $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 78 | $machinesBuilt = @() 79 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 80 | { 81 | $IP = "$subnet.$ip_startrange" 82 | Write-Verbose "will use IP $IP" 83 | Write-Host -ForegroundColor White "Checking for $Nodeprefix$node" 84 | If (!(get-vmx $Nodeprefix$node -WarningAction SilentlyContinue)) 85 | { 86 | $Host_Name = "$Nodeprefix$node" 87 | Write-Host -ForegroundColor Gray "==>Creating $host_name" 88 | $Lab_VMX = New-LabVMX -CentOS -CentOS_ver $centos_ver -Size $Size -SCSI_DISK_COUNT $Disks -SCSI_DISK_SIZE $Disksize -VMXname $Nodeprefix$Node -SCSI_Controller 0 89 | $Global:labdefaults.AnsiblePublicKey = "" 90 | $Annotation = $Lab_VMX | Set-VMXAnnotation -Line1 "rootuser:$Rootuser" -Line2 "rootpasswd:$Guestpassword" -Line3 "Guestuser:$Guestuser" -Line4 "Guestpassword:$Guestpassword" -Line5 "labbuildr by @sddc_guy" -builddate 91 | $Lab_VMX | Set-LabCentosVMX -ip $IP -CentOS_ver $centos_ver -Additional_Epel_Packages ansible -Host_Name $Host_Name 92 | ## 93 | 94 | Write-Host -ForegroundColor Gray " ==>installing ansible" 95 | $Scriptblock = "yum install ansible python-devel krb5-devel krb5-libs krb5-workstation python-pip build-essential libssl-dev libffi-dev python-dev python-cffi -y" 96 | $LAB_VMX | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 97 | 98 | $Scriptblock = ("cat >> /etc/krb5.conf <> /etc/ansible/group_vars/windows.yml <retrieving root key for ansible" 124 | $Scriptblock = '/usr/sbin/vmtoolsd --cmd="info-set guestinfo.ROOT_PUBLIC_KEY $(cat /root/.ssh/id_rsa.pub)"' 125 | Write-Verbose $Scriptblock 126 | $Bashresult = $Lab_VMX | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword # -logfile $Logfile 127 | $Public_Key = $Lab_VMX | Get-VMXVariable -GuestVariable ROOT_PUBLIC_KEY 128 | Set-LABAnsiblePublicKey -AnsiblePublicKey $Public_Key.ROOT_PUBLIC_KEY 129 | } 130 | } 131 | $StopWatch.Stop() 132 | Write-host -ForegroundColor White "Deployment took $($StopWatch.Elapsed.ToString())" 133 | write-Host -ForegroundColor White "Login to the VM´s with root/Password123!" 134 | 135 | -------------------------------------------------------------------------------- /labbuildr/install-aptcache.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-ubuntu.ps1 4 | .DESCRIPTION 5 | install-scaleio is the a vmxtoolkit solutionpack for configuring and deploying scaleio svm´s 6 | 7 | Copyright 2014 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-aptcache.ps1 22 | .EXAMPLE 23 | .\install-Ubuntu.ps1 24 | This will install 3 Ubuntu Nodes Ubuntu1 -Ubuntu3 from the Default Ubuntu Master 25 | 26 | #> 27 | [CmdletBinding( 28 | SupportsShouldProcess=$true, 29 | ConfirmImpact="Medium")] 30 | Param( 31 | [Parameter(Mandatory = $false)] 32 | [ValidateRange(1,1)] 33 | [int32]$Disks = 1, 34 | [Parameter(Mandatory = $false)] 35 | [ValidateSet('16_4','15_10','14_4')] 36 | [string]$ubuntu_ver = "16_4", 37 | [Parameter(Mandatory=$false)] 38 | $Scriptdir = (join-path (Get-Location) "labbuildr-scripts"), 39 | [Parameter(Mandatory=$false)] 40 | $Sourcedir = $Global:labdefaults.Sourcedir, 41 | [Parameter(Mandatory=$false)] 42 | $DefaultGateway = $Global:labdefaults.DefaultGateway, 43 | [Parameter(Mandatory=$false)] 44 | $guestpassword = "Password123!", 45 | $Rootuser = 'root', 46 | $Hostkey = $Global:labdefaults.HostKey, 47 | $Default_Guestuser = 'labbuildr', 48 | [Parameter(Mandatory=$false)] 49 | $Subnet = $Global:labdefaults.MySubnet, 50 | [Parameter(Mandatory=$false)] 51 | $DNS1 = $Global:labdefaults.DNS1, 52 | [Parameter(Mandatory=$false)] 53 | $DNS2 = $Global:labdefaults.DNS2, 54 | [Parameter(Mandatory=$false)] 55 | $Host_Name = $VMXName, 56 | $DNS_DOMAIN_NAME = "$($Global:labdefaults.BuildDomain).$($Global:labdefaults.Custom_DomainSuffix)", 57 | #vmx param 58 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)] 59 | [ValidateSet('XS', 'S', 'M', 'L', 'XL','TXL','XXL')]$Size = "XL", 60 | [ValidateSet('vmnet2','vmnet3','vmnet4','vmnet5','vmnet6','vmnet7','vmnet9','vmnet10','vmnet11','vmnet12','vmnet13','vmnet14','vmnet15','vmnet16','vmnet17','vmnet18','vmnet19')] 61 | $vmnet = $Global:labdefaults.vmnet, 62 | [int]$ip_startrange = 200, 63 | [switch]$upgrade, 64 | [switch]$Defaults 65 | ) 66 | #requires -version 3.0 67 | #requires -module vmxtoolkit 68 | if ($Defaults.IsPresent) 69 | { 70 | Deny-LABDefaults 71 | Break 72 | } 73 | [int]$SCSI_Controller = 0 74 | [int]$SCSI_DISK_COUNT = 0 75 | [Uint64]$SCSI_DISK_SIZE = 100GB 76 | $SCSI_Controller_Type = "pvscsi" 77 | If ($ConfirmPreference -match "none") 78 | {$Confirm = $false} 79 | else 80 | {$Confirm = $true} 81 | $Builddir = $PSScriptRoot 82 | $Scriptdir = Join-Path $Builddir "labbuildr-scripts" 83 | $Masterpath = $Global:labdefaults.Masterpath 84 | 85 | $logfile = "/tmp/labbuildr.log" 86 | [System.Version]$subnet = $Subnet.ToString() 87 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 88 | $rootuser = "root" 89 | $Guestpassword = "Password123!" 90 | [uint64]$Disksize = 100GB 91 | $scsi = 0 92 | $Nodeprefix = "aptcache" 93 | $Nodeprefix = $Nodeprefix.ToLower() 94 | $OS = "Ubuntu" 95 | $Required_Master = "$OS$ubuntu_ver" 96 | $Default_Guestuser = "labbuildr" 97 | $fqdn = "$Nodeprefix.$DNS_DOMAIN_NAME" 98 | if (!($aptcacher = Get-VMX -VMXName $Nodeprefix -WarningAction SilentlyContinue)) 99 | { 100 | $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 101 | $apt_cachedir = Join-Path $Sourcedir "apt-cacher-ng" 102 | if (!(Test-Path $apt_cachedir)) 103 | { 104 | New-Item -ItemType Directory -Path $apt_cachedir | Out-Null 105 | } 106 | $Nodeclone = New-LabVMX -Masterpath $Masterpath -Ubuntu -Ubuntu_ver $ubuntu_ver -VMXname $Nodeprefix -SCSI_DISK_COUNT $Disks -SCSI_Controller 0 -SCSI_Controller_Type lsisas1068 -SCSI_DISK_SIZE 100GB -vmnet $vmnet -Size $Size -ConnectionType custom -AdapterType vmxnet3 -Scenario 8 -Scenarioname "ubuntu" -activationpreference 1 -Displayname $Nodeprefix 107 | $ip="$subnet.$ip_startrange" 108 | If (!$DefaultGateway) 109 | { 110 | $DefaultGateway = $ip 111 | } 112 | # $Nodeclone | Set-LabUbuntuVMX -Ubuntu_ver $ubuntu_ver $Hostkey -ip $ip -Host_Name $Nodeprefix -DNS_DOMAIN_NAME $DNS_DOMAIN_NAME -DNS1 $DNS1 -DNS2 $DNS2 113 | $Nodeclone | Set-LabUbuntuVMX -Ubuntu_ver $ubuntu_ver -Scriptdir $Scriptdir -Sourcedir $Sourcedir -DefaultGateway $DefaultGateway -guestpassword $Guestpassword -Default_Guestuser $Default_Guestuser -Rootuser $rootuser -Hostkey $Hostkey -ip $ip -DNS1 $DNS1 -DNS2 $DNS2 -subnet $subnet -Host_Name $Nodeprefix -DNS_DOMAIN_NAME $DNS_DOMAIN_NAME -use_aptcache:$false 114 | $packages = "apt-cacher-ng" 115 | $Scriptblocks = ( 116 | "apt-get install $packages -y", 117 | "cat > /etc/apt/apt.conf.d/01proxy < etc/apt-cacher-ng/zzz_override.conf <openstack 17 | 18 | ## example 19 | ```Powershell 20 | \ubuntu-bakery.ps1 -openstack 21 | ``` 22 | this will install: 23 | 24 | * 3 Ubuntu 14_4 Nodes 25 | * ScaleIO Configuration with MDM´s on Ubuntu1 and Ubuntu2, Gateway / TB on Ubuntu3 26 | * ScaleIO SDS on all 3 Nodes 27 | * Horizon Dashbord on Ubuntu3 28 | * Nova Compute on Ubuntu1 and Ubuntu2 29 | * Default Openstack liberty 30 | 31 | _**You may want to select mitaka or even Newton, however, as netwon deploys Ubuntu16_4**_ 32 | you can tweak the Size of controllernodes / Openstack Release with 33 | ```Powershell 34 | .\ubuntu-bakery.ps1 -openstack -openstack_release mitaka -Compute_Size TXL 35 | ``` 36 | this will configure the compute nodes with 6GB of Memory and will aslo install a base tenant config 37 | ![image](https://cloud.githubusercontent.com/assets/8255007/18787425/28e0c696-81a3-11e6-972b-4006a2879a64.png) 38 | ## create a volume from Horizon Portal 39 | ![image](https://cloud.githubusercontent.com/assets/8255007/18471448/34528fda-79b2-11e6-9731-788fb08b0f4a.png) 40 | ## create Snapshot from Horizon Portal 41 | ![image](https://cloud.githubusercontent.com/assets/8255007/18466722/146f0686-799d-11e6-97e4-5da2c0de81c5.png) 42 | ## view Volume and Snap Properties 43 | ![image](https://cloud.githubusercontent.com/assets/8255007/18466748/3168ab5c-799d-11e6-9bd6-d65264e8ffd2.png) 44 | ![image](https://cloud.githubusercontent.com/assets/8255007/18466766/4961d954-799d-11e6-89f6-6b920142c887.png) 45 | 46 | 47 | ## view volume from ScaleIO Gui 48 | ![image](https://cloud.githubusercontent.com/assets/8255007/18466621/b43b3992-799c-11e6-8092-5623e849a8b4.png) 49 | 50 | 51 | ## Options 52 | the Default configuration uses ScaleIO as a cinder Backend. 53 | you can Switch / add a backend / multi-backend with 54 | ```Powershell 55 | ./ubuntu-bakery.ps1 -openstack -cinder scaleio,unity 56 | ``` 57 | the unity Backend expects a default labbuildr unity configuration, however, if you wand to specify a different Unity system * [Unity](install-unity-falcon.ps1), you need to pass along Custom_unity_ip 58 | custom_unity_vpool_name 59 | Custom_Unity_Target_ip 60 | where Targe_IP is the iSCSI Portal Address and Unity_IP is the Management IP 61 | ##troubleshooting 62 | for the bakery process of scaleio tail into /tmp/labbuildr.log on the Controller node: 63 | ![image](https://cloud.githubusercontent.com/assets/8255007/18591724/0ec59ff8-7c34-11e6-9068-44e1653a6d22.png) 64 | 65 |

kubernetes

66 | # Kubernetes 67 | 68 | you can start a basic Kubernetes setup by simply typing 69 | 70 | ```Powershell 71 | .\ubuntu-bakery.ps1 -kubernetes 72 | ``` 73 | 74 | this will create a basic, 2-Node Kubernetes Deployment with a dedicated Master 75 | the default configuration builds up the system pod, flannel pod networking support, and the dashboard with rbac constraints. 76 | the deployment will take up to 6 Minutes. 77 | 78 | you may also add scaleio switch, this will build a 3-node scaleio/kubernetes cluster 79 | 80 | ```Powershell 81 | .\ubuntu-bakery.ps1 -kubernetes -scaleio 82 | ``` 83 | 84 | in step1, labbuildr deploy´s the 2 Nodes 85 | 86 | ![image](https://cloud.githubusercontent.com/assets/8255007/24656102/52bb7d7c-1941-11e7-8ae0-c7bbe59b58ec.png) 87 | 88 | then, after basic node config is done, kubernetes and docker binaries are installed. 89 | the first node will install the kubernetes master with kubeadm 90 | ![image](https://cloud.githubusercontent.com/assets/8255007/24656180/babe890a-1941-11e7-84e0-3618bd6d0e49.png) 91 | 92 | the slave nodes will use kubeadm join to join the cluster. 93 | once the cluster is built, kubernetes dashboard deployment starts. 94 | 95 | ![image](https://cloud.githubusercontent.com/assets/8255007/24656226/eb3f4510-1941-11e7-8ad3-8e366aa462e6.png) 96 | 97 | 98 | follow the instructions for [Kubernetes Dashboard](http://labbuildr.readthedocs.io/en/master/Solutionpacks///ubuntu-bakery.ps1#kubernetes-dashboard) 99 | 100 |

Kubernetes Dashboard

101 | 102 | there are multiple options to run the kubernetes dashboard 103 | - using kubectl on windows (copy config from host with scp upfront ): 104 | 105 | ```Powershell 106 | Install-Script install-kubectl -Scope CurrentUser -Force 107 | install-kubectl.ps1 -Downloadlocation $HOME/kubectl/ 108 | .$HOME/kubectl/kubectl.exe proxy 109 | ``` 110 | 111 | if you are running windows 10 with Bash support( requires at least Anniversary Update) the do the following: 112 | Open Bash on ubuntu on windows 113 | ![image](https://cloud.githubusercontent.com/assets/8255007/24656353/7bf784c8-1942-11e7-9d2b-c06fd5f9dec2.png) 114 | if not already added, add the kubernetes repo to apt sources: 115 | 116 | do a su session in bash 117 | ```bash 118 | sudo su 119 | ``` 120 | run as root: 121 | ```bash 122 | curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - 123 | cat </etc/apt/sources.list.d/kubernetes.list 124 | deb http://apt.kubernetes.io/ kubernetes-xenial main 125 | EOF 126 | apt-get update 127 | apt-get install -y kubectl 128 | ``` 129 | ![image](https://cloud.githubusercontent.com/assets/8255007/24663358/fc7386dc-1957-11e7-9006-33488c4dc427.png) 130 | 131 | once kubectl is installed, exit the su session, make a .kube directory in your $HOME and copy the admin.conf from the master to your machine. 132 | ```bash 133 | exit 134 | mkdir $HOME/.kube 135 | scp root@192.168.2.201:/root/admin.conf $HOME/.kube/config 136 | ``` 137 | start kubectl proxy to start serving the proxy to the dashboard 138 | 139 | ```bash 140 | kubectl proxy 141 | ``` 142 | ![image](https://cloud.githubusercontent.com/assets/8255007/24664097/083f5a84-195a-11e7-8b93-9fbf8bc349e7.png) 143 | 144 | you can now start the dashboard by pointing the Browser to http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ 145 | 146 | 147 | ![image](https://cloud.githubusercontent.com/assets/8255007/24664182/49bba698-195a-11e7-918f-b7c66186ff52.png) 148 | 149 | -------------------------------------------------------------------------------- /labbuildr/install-geonas.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-scaleio.ps1 4 | .DESCRIPTION 5 | install-scaleio is the a vmxtoolkit solutionpack for configuring and deploying scaleio svm´s 6 | 7 | Copyright 2014 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | .EXAMPLE 22 | .\install-geonas.ps1 -ovf D:\Sources\geonas-ESXi5-5.1.0.6695\geonas-ESXi5-5.1.0.6695.ovf 23 | This will convert geonas ESX Template 24 | .EXAMPLE 25 | .\install-geonas.ps1 -MasterPath .\geonas-cacheESXi5-5.1.0.6695 -Defaults 26 | This will Install default Cloud boost 27 | #> 28 | [CmdletBinding()] 29 | Param( 30 | ### import parameters 31 | [Parameter(ParameterSetName = "import",Mandatory=$true)][String] 32 | [ValidateScript({ Test-Path -Path $_ -Filter *.ov* -PathType Leaf})]$ova, 33 | <### install param 34 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)] 35 | [Parameter(ParameterSetName = "install",Mandatory=$false)][ValidateRange(1,3)][int32]$Cachevols = 1, 36 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)] 37 | [Parameter(ParameterSetName = "install",Mandatory=$false)][ValidateSet(36GB,72GB,146GB)][uint64]$Cachevolsize = 146GB, 38 | #> 39 | #[Parameter(ParameterSetName = "defaults", Mandatory = $true)] 40 | [Parameter(ParameterSetName = "install",Mandatory=$true)][ValidateScript({ Test-Path -Path $_ -ErrorAction SilentlyContinue })]$Master, 41 | 42 | 43 | 44 | [Parameter(ParameterSetName = "defaults", Mandatory = $true)][switch]$Defaults, 45 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)][ValidateScript({ Test-Path -Path $_ })]$Defaultsfile=".\defaults.json", 46 | 47 | 48 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)] 49 | [Parameter(ParameterSetName = "install",Mandatory=$false)][validateRange(1,3)][int32]$Nodes=1, 50 | 51 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)] 52 | [Parameter(ParameterSetName = "install",Mandatory=$false)][int32]$Startnode = 1, 53 | 54 | [Parameter(ParameterSetName = "install", Mandatory = $true)][ValidateSet('vmnet2','vmnet3','vmnet4','vmnet5','vmnet6','vmnet7','vmnet9','vmnet10','vmnet11','vmnet12','vmnet13','vmnet14','vmnet15','vmnet16','vmnet17','vmnet18','vmnet19')]$VMnet = "vmnet2", 55 | 56 | [Parameter(Mandatory = $true)][ValidateSet('primary','sitecache')]$role = "primary" 57 | 58 | ) 59 | #requires -version 3.0 60 | #requires -module vmxtoolkit 61 | 62 | function clone-node 63 | { 64 | [CmdletBinding()] 65 | Param( 66 | $Nodename 67 | ) 68 | 69 | Write-Verbose "Checking VM $Nodename already Exists" 70 | If (!(get-vmx $Nodename)) 71 | { 72 | Write-Host -ForegroundColor Magenta " ==>Creating clone $Nodename" 73 | $NodeClone = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" | New-VMXClone -CloneName $Nodeprefix$node 74 | Write-Host -ForegroundColor Magenta " ==>tweaking $Nodeprefix to run on Workstation" 75 | $NodeClone | Set-VMXmemory -MemoryMB 8192 | Out-Null 76 | Write-Verbose "Setting ext-0" 77 | Set-VMXNetworkAdapter -Adapter 0 -ConnectionType custom -AdapterType e1000 -PCISlot 32 -config $NodeClone.Config | Out-Null 78 | Set-VMXVnet -Adapter 0 -vnet $vmnet -config $NodeClone.Config | Out-Null 79 | $SetScenario = Set-VMXscenario -config $NodeClone.Config -Scenarioname $Scenario -Scenario 6 80 | $SetActivationPrefrence = Set-VMXActivationPreference -config $NodeClone.Config -activationpreference $Node 81 | # Set-VMXVnet -Adapter 0 -vnet vmnet2 82 | write-verbose "Setting Display Name $($NodeClone.CloneName)@$Builddomain" 83 | Set-VMXDisplayName -config $NodeClone.Config -Displayname "$($NodeClone.CloneName)@$Builddomain" | Out-Null 84 | Write-host -ForegroundColor Magenta " ==>Starting $Nodename" 85 | 86 | start-vmx -Path $NodeClone.config -VMXName $NodeClone.CloneName | Out-Null 87 | } # end check vm 88 | else 89 | { 90 | Write-Warning "VM $Nodeprefix$node already exists" 91 | } 92 | 93 | 94 | 95 | 96 | } 97 | 98 | $Scenario = "geonas" 99 | switch ($PsCmdlet.ParameterSetName) 100 | { 101 | "import" 102 | { 103 | 104 | if (!(($Mymaster = Get-Item $ova).Extension -match "ovf" -or "ova")) 105 | { 106 | write-warning "no ova Template found" 107 | exit 108 | } 109 | 110 | # if (!($mastername)) {$mastername = (Split-Path -Leaf $ovf).Replace(".ovf","")} 111 | # $Mymaster = Get-Item $ovf 112 | $Mastername = "$($scenario)_$($role)_master" 113 | Write-Host -ForegroundColor Magenta " ==>Importing $Mastername" 114 | import-VMXOVATemplate -OVA $ova -Name $Mastername 115 | # & $global:vmwarepath\OVFTool\ovftool.exe --lax --skipManifestCheck --name=$mastername $ovf $PSScriptRoot # 116 | Write-Host -ForegroundColor Magenta " ==>tweaking $Mastername" 117 | $Content = Get-Content $PSScriptRoot\$mastername\$mastername.vmx 118 | $Content = $Content -notmatch 'snapshot.maxSnapshots' 119 | $Content = $Content -notmatch 'vmci0.pciSlotNumber' 120 | $Content += 'vmci0.pciSlotNumber = "33"' 121 | $Content | Set-Content $PSScriptRoot\$mastername\$mastername.vmx 122 | $Mastervmx = get-vmx -path $PSScriptRoot\$mastername\$mastername.vmx 123 | $Mastervmx | Set-VMXHWversion -HWversion 7 | Out-Null 124 | write-host -ForegroundColor Magenta "Now run .\install-geonas.ps1 -role $role -Defaults" 125 | } 126 | default 127 | { 128 | If ($Defaults.IsPresent) 129 | { 130 | $labdefaults = Get-labDefaults 131 | $vmnet = $labdefaults.vmnet 132 | $subnet = $labdefaults.MySubnet 133 | $BuildDomain = $labdefaults.BuildDomain 134 | $Sourcedir = $labdefaults.Sourcedir 135 | $Gateway = $labdefaults.Gateway 136 | $DefaultGateway = $labdefaults.Defaultgateway 137 | $DNS1 = $labdefaults.DNS1 138 | $configure = $true 139 | } 140 | 141 | 142 | 143 | $Nodeprefix = "$($Scenario)$role" 144 | If (!($Master)) 145 | { 146 | $master = "$($scenario)_$($role)_master" 147 | } 148 | If (!($MasterVMX = get-vmx -path $Master)) 149 | { 150 | Write-Error "No Valid Master Found" 151 | break 152 | } 153 | 154 | 155 | $Basesnap = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" 156 | if (!$Basesnap) 157 | { 158 | Write-Host -ForegroundColor Magenta " ==>tweaking $Mastername" 159 | $Config = Get-VMXConfig -config $MasterVMX.Config 160 | $Config = $Config -notmatch 'snapshot.maxSnapshots' 161 | $Config | set-Content -Path $MasterVMX.Config 162 | Write-Host -ForegroundColor Magenta " ==>Creating Basesnap" 163 | $Basesnap = $MasterVMX | New-VMXSnapshot -SnapshotName BASE 164 | if (!$MasterVMX.Template) 165 | { 166 | write-verbose "Templating Master VMX" 167 | $template = $MasterVMX | Set-VMXTemplate 168 | } 169 | 170 | } #end basesnap 171 | ####Build Machines# 172 | switch ($role) 173 | { 174 | "primary" 175 | { 176 | clone-node -Nodename $Nodeprefix 177 | } 178 | 179 | "sitecache" 180 | { 181 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 182 | { 183 | clone-node -Nodename $Nodeprefix$node 184 | }#end foreach 185 | } 186 | } 187 | Write-Host "Login to geonas with admin / password" 188 | } # end default 189 | 190 | 191 | }# end switch -------------------------------------------------------------------------------- /labbuildr/install-vcsa.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-vcsa.ps1 -ovf C:\Sources\vmware-vcsa.ova 4 | .Description 5 | install-VCSA only applies to Testers of the Virtual VCSA 6 | install-VCSA is a 2 Step Process. 7 | Once VCSA is downloaded via vmware, run 8 | .\install-VCSA.ps1 -Mastername [mastername] 9 | This creates a VCSA Master in your labbuildr directory. 10 | This installs a VCSA using the defaults file and the just extracted VCSA Master 11 | 12 | 13 | Copyright 2016 Karsten Bott 14 | 15 | Licensed under the Apache License, Version 2.0 (the "License"); 16 | you may not use this file except in compliance with the License. 17 | You may obtain a copy of the License at 18 | 19 | http://www.apache.org/licenses/LICENSE-2.0 20 | 21 | Unless required by applicable law or agreed to in writing, software 22 | distributed under the License is distributed on an "AS IS" BASIS, 23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | See the License for the specific language governing permissions and 25 | limitations under the License. 26 | .LINK 27 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-VCSA.ps1 28 | .EXAMPLE 29 | Importing the ovf template 30 | .\install-vcsa.ps1 -ovf C:\Sourcesvmware-vcsa.ova 31 | .EXAMPLE 32 | Install a VCSANode with defaults from defaults.json 33 | .\install-vcsa.ps1 -Mastername vmware-vcsa 34 | 35 | #> 36 | [CmdletBinding(DefaultParametersetName = "default")] 37 | Param( 38 | [Parameter(ParameterSetName = "import",Mandatory=$true)][String] 39 | [ValidateScript({ Test-Path -Path $_ -Filter *.ova -PathType Leaf -ErrorAction SilentlyContinue })]$ovf, 40 | [Parameter(ParameterSetName = "install",Mandatory=$true)] 41 | [Parameter(ParameterSetName = "import",Mandatory=$false)][String]$Mastername, 42 | [Parameter(ParameterSetName = "import",Mandatory=$false)] 43 | [Parameter(ParameterSetName = "install",Mandatory=$False)] 44 | [Parameter(Mandatory = $false)][switch]$Defaults, 45 | [Parameter(Mandatory=$false)] 46 | [ValidateScript({$_ -match [IPAddress]$_ })][ipaddress]$subnet = $Global:labdefaults.MySubnet, 47 | [Parameter(ParameterSetName = "install", Mandatory = $false)] 48 | [ValidateSet('vmnet2','vmnet3','vmnet4','vmnet5','vmnet6','vmnet7','vmnet9','vmnet10','vmnet11','vmnet12','vmnet13','vmnet14','vmnet15','vmnet16','vmnet17','vmnet18','vmnet19')] 49 | $VMnet = $Global:labdefaults.vmnet, 50 | $Sourcedir = $Global:labdefaults.sourcedir, 51 | $Masterpath = $Global:LabDefaults.Masterpath, 52 | $BuildDomain = $Global:labdefaults.Builddomain, 53 | $DNS1 = $Global:labdefaults.DNS1, 54 | $DefaultGateway = $Global:labdefaults.DefaultGateway 55 | ) 56 | #requires -version 3.0 57 | #requires -module vmxtoolkit 58 | if ($Defaults.IsPresent) 59 | { 60 | Deny-LabDefaults 61 | } 62 | $Builddir = $PSScriptRoot 63 | $Password = "Password123!" 64 | $SSO_Domain = "vmware.local" 65 | 66 | switch ($PsCmdlet.ParameterSetName) 67 | { 68 | 69 | "import" 70 | { 71 | if (!$Masterpath) 72 | { 73 | try 74 | { 75 | $Masterpath = (get-labdefaults).Masterpath 76 | } 77 | catch 78 | { 79 | Write-Host -ForegroundColor Gray " ==>No Masterpath specified, trying default" 80 | $Masterpath = $Builddir 81 | } 82 | } 83 | if (!($mastername)) 84 | { 85 | $OVFfile = Get-Item $ovf 86 | $mastername = $OVFfile.BaseName 87 | } 88 | $Template = Import-VMXOVATemplate -OVA $ovf -acceptAllEulas -AllowExtraConfig -destination $MasterPath 89 | # & $global:vmwarepath\OVFTool\ovftool.exe --lax --skipManifestCheck --acceptAllEulas --name=$mastername $ovf $PSScriptRoot # 90 | Write-Host -ForegroundColor Magenta "Use .\install-VCSA.ps1 -Mastername $($Template.VMname) to try defaults" 91 | } 92 | 93 | default 94 | { 95 | $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 96 | If ($ConfirmPreference -match "none") 97 | {$Confirm = $false} 98 | else 99 | {$Confirm = $true} 100 | $Builddir = $PSScriptRoot 101 | $Scriptdir = Join-Path $Builddir "Scripts" 102 | if (!$DNS2) 103 | { 104 | $DNS2 = $DNS1 105 | } 106 | if (!$Masterpath) {$Masterpath = $Builddir} 107 | 108 | $Startnode = 1 109 | $Nodes = 1 110 | 111 | [System.Version]$subnet = $Subnet.ToString() 112 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 113 | 114 | $Builddir = $PSScriptRoot 115 | $Nodeprefix = "VCSANode" 116 | if (!$Mastername) 117 | { 118 | $MasterVMX = get-vmx -path $Masterpath -VMXName vmware-vcsa 119 | iF ($MasterVMX) 120 | { 121 | $MasterVMX = $MasterVMX | Sort-Object -Descending 122 | $MasterVMX = $MasterVMX[-1] 123 | } 124 | } 125 | else 126 | { 127 | if ($MasterPath) 128 | { 129 | $MasterVMX = get-vmx -path $MasterPath -VMXName $Mastername 130 | } 131 | } 132 | 133 | if (!$MasterVMX) 134 | { 135 | write-Host -ForegroundColor RED "Could not find existing VCSAMaster" 136 | return 137 | } 138 | if (!$MasterVMX.Template) 139 | { 140 | $template = $MasterVMX | Set-VMXTemplate 141 | } 142 | $Basesnap = $MasterVMX | Get-VMXSnapshot -WarningAction SilentlyContinue| where Snapshot -Match "Base" 143 | 144 | if (!$Basesnap) 145 | { 146 | $Basesnap = $MasterVMX | New-VMXSnapshot -SnapshotName Base 147 | } 148 | 149 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 150 | { 151 | $ipoffset = 79+$Node 152 | If (!(get-vmx -path $Nodeprefix$node -WarningAction SilentlyContinue)) 153 | { 154 | $NodeClone = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" | New-VMXlinkedClone -CloneName $Nodeprefix$node -Clonepath "$Builddir" 155 | foreach ($nic in 0..0) 156 | { 157 | $Netadater0 = $NodeClone | Set-VMXVnet -Adapter $nic -vnet $VMnet -WarningAction SilentlyContinue 158 | } 159 | [string]$ip="$($subnet.ToString()).$($ipoffset.ToString())" 160 | $config = Get-VMXConfig -config $NodeClone.config 161 | # $config += "vami.vmname = `"$Nodeprefix$Node`"" 162 | # $config += "guestinfo.cis.system.vm0.hostname.value = `"$Nodeprefix$Node`"" 163 | $config += "guestinfo.cis.deployment.node.type = `"embedded`"" 164 | $config += "guestinfo.cis.deployment.autoconfig = `"true`"" 165 | $config += "guestinfo.cis.vmdir.domain-name = `"$BuildDomain.$SSO_Domain`"" 166 | $config += "guestinfo.cis.vmdir.site-name = `"$BuildDomain`"" 167 | $config += "guestinfo.cis.vmdir.password = `"$Password`"" 168 | $config += "guestinfo.cis.appliance.net.addr.family = `"ipv4`"" 169 | $config += "guestinfo.cis.appliance.net.addr = `"$ip`"" 170 | $config += "guestinfo.cis.appliance.net.pnid = `"$ip`"" 171 | $config += "guestinfo.cis.appliance.net.prefix = `"24`"" 172 | $config += "guestinfo.cis.appliance.net.mode = `"static`"" 173 | $config += "guestinfo.cis.appliance.net.dns.servers = `"$DNS1,$DNS2`"" 174 | $config += "guestinfo.cis.appliance.ntp.servers = `"pool.ntp.org`"" 175 | $config += "guestinfo.cis.appliance.net.gateway = `"$DefaultGateway`"" 176 | $config += "guestinfo.cis.appliance.root.passwd = `"$Password`"" 177 | $config += "guestinfo.cis.appliance.ssh.enabled = `"true`"" 178 | $config += "guestinfo.cis.ceip.enabled = `"false`"" 179 | $config | Set-Content -Path $NodeClone.config 180 | $Displayname = $NodeClone | Set-VMXDisplayName -DisplayName $NodeClone.CloneName 181 | $MainMem = $NodeClone | Set-VMXMainMemory -usefile:$false 182 | $Annotation = $Nodeclone | Set-VMXAnnotation -Line1 "Login Credentials" -Line2 "Administrator@$BuildDomain.$SSO_Domain" -Line3 "Password" -Line4 "$Password" 183 | $NodeClone | start-vmx | Out-Null 184 | } 185 | else 186 | { 187 | Write-Warning "Node $Nodeprefix$node already exists" 188 | } 189 | } 190 | Write-host 191 | $StopWatch.Stop() 192 | Write-host -ForegroundColor White "****** VCSA Deployed successful****** 193 | Deployment took $($StopWatch.Elapsed.ToString()) 194 | allow up to 10 minutes to configure and install. 195 | once you see the appliance login console, 196 | login to vCenter at 197 | https://$ip with Administrator@$BuildDomain.$SSO_Domain / $Password 198 | to view / change the VCSA configuration, browse to 199 | https://$($ip):5480 and login with root / $Password 200 | " 201 | 202 | }# end default 203 | } 204 | 205 | -------------------------------------------------------------------------------- /labbuildr/install-photonos.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-coreos.ps1 4 | .DESCRIPTION 5 | install-coreos is the a vmxtoolkit solutionpack installing coreos to run docker containers 6 | 7 | Copyright 2015 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///SolutionPacks#install-coreos 22 | .EXAMPLE 23 | .\install-coreos.ps1 -defaults 24 | this will install a Puppetmaster on CentOS7 using default Values derived from defaults.json 25 | 26 | #> 27 | # 28 | [CmdletBinding()] 29 | Param( 30 | [Parameter(ParameterSetName = "install", Mandatory = $false)] 31 | [ValidateScript( { Test-Path -Path $_ -ErrorAction SilentlyContinue })]$Sourcedir = $labdefaults.Sourcedir, 32 | [Parameter(ParameterSetName = "install", Mandatory = $false)][ValidateScript( {$_ -match [IPAddress]$_ })][ipaddress]$subnet = $labdefaults.MySubnet, 33 | [Parameter(ParameterSetName = "install", Mandatory = $False)] 34 | [ValidateLength(1, 15)][ValidatePattern("^[a-zA-Z0-9][a-zA-Z0-9-]{1,15}[a-zA-Z0-9]+$")][string]$BuildDomain = $labdefaults.BuildDomain, 35 | [Parameter(ParameterSetName = "install", Mandatory = $false)][ValidateSet('vmnet1', 'vmnet2', 'vmnet3')]$vmnet = $labdefaults.vmnet, 36 | [Parameter(ParameterSetName = "install", Mandatory = $false)][ValidateSet('photon-1.0-rev2')]$photonOS = 'photon-1.0-rev2', 37 | [Parameter(ParameterSetName = "install", Mandatory = $false)]$masterpath = $labdefaults.Masterpath, 38 | [Parameter(ParameterSetName = "install", Mandatory = $false)]$DNS1 = $labdefaults.DNS1, 39 | [Parameter(ParameterSetName = "install", Mandatory = $false)]$DefaultGateway = $labdefaults.DefaultGateway, 40 | [Parameter(ParameterSetName = "install", Mandatory = $false)]$Hostkey = $labdefaults.Hostkey, 41 | [Parameter(ParameterSetName = "install", Mandatory = $False)][ValidateRange(1, 3)][int32]$Disks, 42 | $Startnode = 1, 43 | $nodes = 1, 44 | [uint64]$Disksize = 100GB, 45 | $rootpasswd = "Password123!", 46 | [int]$IP_Offset = 40, 47 | [switch]$docker_registry 48 | 49 | ) 50 | #requires -version 3.0 51 | #requires -module vmxtoolkit 52 | [System.Version]$subnet = $subnet.ToString() 53 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 54 | $writefile = @() 55 | $runcmd = @() 56 | if ($docker_registry.IsPresent) { 57 | Set-LABDockerRegistry -DockerRegistry "$subnet.40" 58 | } 59 | if ($labdefaults.DockerRegistry -ne "") { 60 | $runcmd += " - echo '{ `"insecure-registries`":[`"$($labdefaults.DockerRegistry):5000`"],' >> /etc/docker/daemon.json`n" 61 | $runcmd += " - echo ' `"registry-mirrors`":[`"http://$($labdefaults.DockerRegistry):5000`"] }' >> /etc/docker/daemon.json`n" 62 | $runcmd += " - systemctl restart docker`n" 63 | } 64 | $runcmd += " - curl -L https://github.com/docker/compose/releases/download/1.13.0/docker-compose-``uname -s``-``uname -m`` > /usr/bin/docker-compose`n" 65 | $runcmd += " - chmod +X /usr/bin/docker-compose;chmod 755 /usr/bin/docker-compose`n" 66 | 67 | $Nodeprefix = "PhotonOSNode" 68 | if ($docker_registry.IsPresent) { 69 | $disks = 1 70 | $Disksize = 500GB 71 | $nodes = 1 72 | $Nodeprefix = "DockerRegistry" 73 | $IP_Offset = $IP_Offset - 1 74 | $runcmd += " - echo -e `"o\nn\np\n1\n\n\nw`" | fdisk /dev/sdb`n" 75 | $runcmd += " - mkfs.ext4 /dev/sdb1`n" 76 | $runcmd += " - echo `"/dev/sdb1 /data ext4 defaults 1 1`" >> /etc/fstab`n" 77 | $runcmd += " - mkdir /data;mount /data`n" 78 | # $runcmd += " - /usr/bin/docker-compose -f /root/docker-compose.yml up -d" 79 | $runcmd += " - /usr/bin/docker run -d -p 5000:5000 --restart=always --name registry -v /data:/var/lib/registry -v /root/config.yml:/etc/docker/registry/config.yml registry:latest" 80 | $writefile += " 81 | - path: /root/config.yml 82 | content: | 83 | version: 0.1 84 | log: 85 | fields: 86 | service: registry 87 | storage: 88 | cache: 89 | blobdescriptor: inmemory 90 | filesystem: 91 | rootdirectory: /var/lib/registry 92 | http: 93 | addr: :5000 94 | headers: 95 | X-Content-Type-Options: [nosniff] 96 | health: 97 | storagedriver: 98 | enabled: true 99 | interval: 10s 100 | threshold: 3 101 | proxy: 102 | remoteurl: https://registry-1.docker.io 103 | " 104 | } 105 | $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 106 | $Master_StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 107 | $masterVMX = Test-LABmaster -Masterpath $masterpath -Master $photonOS 108 | $Master_StopWatch.stop() 109 | New-Item -ItemType Directory ./labbuildr-scripts/Photon/config-drive -Force | Out-Null 110 | $Hostkey = $HostKey -split "\n" | select -First 1 111 | foreach ($Node in $Startnode..(($Startnode - 1) + $Nodes)) { 112 | if (!(get-vmx $Nodeprefix$node -WarningAction SilentlyContinue)) { 113 | write-verbose "Creating $Nodeprefix$node" 114 | $NodeClone = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" | New-VMXLinkedClone -CloneName $Nodeprefix$Node 115 | $IP_byte = $IP_Offset + $node 116 | $IP = "$subnet.$ip_byte" 117 | $meta_Data = "instance-id: iid-local01 118 | local-hostname: cloudimg" 119 | 120 | $User_data = "#cloud-config 121 | hostname: $($nodeclone.clonename) 122 | ssh_authorized_keys: 123 | - $($Hostkey) 124 | write_files: 125 | - path: /etc/systemd/network/10-static-en.network 126 | permissions: 0644 127 | content: | 128 | [Match] 129 | Name=eth0 130 | [Network] 131 | Address=$IP/24 132 | Gateway=$DefaultGateway 133 | DNS=$DNS1 134 | DNS=8.8.8.8 135 | - path: /etc/systemd/network/10-dhcp-en.network 136 | permissions: 0644 137 | content: | 138 | $writefile 139 | runcmd: 140 | - systemctl restart systemd-networkd 141 | - passwd root -u 142 | - passwd root -x 99999999 143 | - echo -e '$rootpasswd\n$rootpasswd' | passwd root 144 | - systemctl enable docker 145 | - systemctl start docker 146 | $runcmd 147 | " 148 | # - /etc/docker/daemon.json 149 | # permissions 755 150 | # content: | 151 | # { `"insecure-registries`":[`"$subnet.40:5000`"] } 152 | 153 | $User_data | Set-Content -Path "$PSScriptRoot/labbuildr-scripts/Photon/config-drive/user-data" | Out-Null 154 | $meta_Data | Set-Content -Path "$PSScriptRoot/labbuildr-scripts/Photon/config-drive/meta-data" | Out-Null 155 | convert-VMXdos2unix -Sourcefile "$PSScriptRoot/labbuildr-scripts/Photon/config-drive/user-data" | Out-Null 156 | convert-VMXdos2unix -Sourcefile "$PSScriptRoot/labbuildr-scripts/Photon/config-drive/meta-data" | Out-Null 157 | Write-Host -ForegroundColor Gray " ==>Creating seed iso" 158 | .$global:mkisofs -R -J -V cidata -o "$($NodeClone.path)/seed.iso" "$PSScriptRoot/labbuildr-scripts/Photon/config-drive" # | Out-Null 159 | $NodeClone | Connect-VMXcdromImage -ISOfile "$($NodeClone.path)/seed.iso" -Contoller ide -Port 1:0 | Out-Null 160 | $NodeClone | Set-VMXNetworkAdapter -Adapter 0 -ConnectionType custom -AdapterType vmxnet3 -WarningAction SilentlyContinue | Out-Null 161 | $NodeClone | Set-VMXVnet -Adapter 0 -Vnet $vmnet -WarningAction SilentlyContinue | Out-Null 162 | $NodeClone | Set-VMXDisplayName -DisplayName "$($NodeClone.Clonename)@$BuildDomain" | Out-Null 163 | $NodeClone | Set-VMXAnnotation -Line1 "root password" -Line2 $rootpasswd | Out-Null 164 | if ($disks) { 165 | $SCSI = 0 166 | foreach ($LUN in (1..($Disks))) { 167 | $Diskname = "SCSI$SCSI" + "_LUN$LUN.vmdk" 168 | $Newdisk = New-VMXScsiDisk -NewDiskSize $Disksize -NewDiskname $Diskname -Verbose -VMXName $NodeClone.VMXname -Path $NodeClone.Path 169 | $AddDisk = $NodeClone | Add-VMXScsiDisk -Diskname $Newdisk.Diskname -LUN $LUN -Controller $SCSI 170 | } 171 | } 172 | $Content = $Nodeclone | Get-VMXConfig 173 | $Content = $Content -replace 'preset', 'soft' 174 | $Content | Set-Content -Path $NodeClone.config #> 175 | $NodeClone | start-vmx | Out-Null 176 | }#end machine 177 | 178 | else { 179 | Write-Warning "Machine already exists" 180 | } 181 | 182 | 183 | }#end foreach 184 | 185 | $StopWatch.Stop() 186 | Write-host -ForegroundColor White "Deployment took $($StopWatch.Elapsed.ToString())" 187 | Write-host -ForegroundColor White "Master Section took $($Master_StopWatch.Elapsed.ToString())" 188 | 189 | 190 | -------------------------------------------------------------------------------- /labbuildr/install-esxiova.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | 4 | .Description 5 | install-esxiova only applies to Testers of the Virtual esxiova 6 | install-esxiova is a 2 Step Process. 7 | Once esxiova is downloaded via vmware, run 8 | .\install-esxiova.ps1 -defaults 9 | This creates a esxiova Master in your labbuildr directory. 10 | This installs a esxiova using the defaults file and the just extracted esxiova Master 11 | 12 | 13 | Copyright 2016 Karsten Bott 14 | 15 | Licensed under the Apache License, Version 2.0 (the "License"); 16 | you may not use this file except in compliance with the License. 17 | You may obtain a copy of the License at 18 | 19 | http://www.apache.org/licenses/LICENSE-2.0 20 | 21 | Unless required by applicable law or agreed to in writing, software 22 | distributed under the License is distributed on an "AS IS" BASIS, 23 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 24 | See the License for the specific language governing permissions and 25 | limitations under the License. 26 | .LINK 27 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-esxiova.ps1 28 | .EXAMPLE 29 | Importing the ovf template 30 | .\install-esxiova.ps1 -import -nestedesx_ver ['Nested_ESXi6','Nested_ESXi5','Nested_ESXi6.5'] 31 | .EXAMPLE 32 | Install a esxiovaNode with defaults from defaults.json 33 | .\install-esxiova.ps1 -nestedesx_ver ['Nested_ESXi6.0',Nested_ESXi6.5'] 34 | 35 | #> 36 | [CmdletBinding(DefaultParametersetName = "default")] 37 | Param( 38 | [Parameter(ParameterSetName = "Import", Mandatory = $true)] 39 | [switch]$import, 40 | # ''Nested_ESXi6.0','Nested_ESXi6.5' 41 | [ValidateSet( 42 | 'Nested_ESXi6.0','Nested_ESXi6.5d','Nested_ESXi6.5U1' 43 | )] 44 | [string]$nestedesx_ver = "Nested_ESXi6.5", 45 | [String]$Mastername, 46 | [ValidateRange(3,14)] 47 | [int] 48 | $Disks = 3, 49 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 50 | [ValidateRange(1,6)][int] 51 | $Startnode = 1, 52 | <# 53 | Size for openstack compute nodes 54 | 'XS' = 1vCPU, 512MB 55 | 'S' = 1vCPU, 768MB 56 | 'M' = 1vCPU, 1024MB 57 | 'L' = 2vCPU, 2048MB 58 | 'XL' = 2vCPU, 4096MB 59 | 'TXL' = 4vCPU, 6144MB 60 | 'XXL' = 4vCPU, 8192MB 61 | #> 62 | [ValidateSet('XS', 'S', 'M', 'L', 'XL','TXL','XXL')] 63 | $Size = "XL", 64 | [ValidateRange(1,6)] 65 | [int]$Nodes = 1, 66 | [Parameter(Mandatory = $false)][switch]$Defaults, 67 | [Parameter(Mandatory=$false)] 68 | [ValidateScript({$_ -match [IPAddress]$_ })][ipaddress]$subnet = $Global:labdefaults.MySubnet, 69 | [Parameter(ParameterSetName = "install", Mandatory = $false)] 70 | [ValidateSet('vmnet2','vmnet3','vmnet4','vmnet5','vmnet6','vmnet7','vmnet9','vmnet10','vmnet11','vmnet12','vmnet13','vmnet14','vmnet15','vmnet16','vmnet17','vmnet18','vmnet19')] 71 | $VMnet = $Global:labdefaults.vmnet, 72 | $Sourcedir = $Global:labdefaults.sourcedir, 73 | $Masterpath = $Global:LabDefaults.Masterpath 74 | ) 75 | #requires -version 3.0 76 | #requires -module vmxtoolkit 77 | if ($Defaults.IsPresent) 78 | { 79 | Deny-LabDefaults 80 | } 81 | $Builddir = $PSScriptRoot 82 | $Password = "Password123!" 83 | $SSO_Domain = "vmware.local" 84 | switch ($PsCmdlet.ParameterSetName) 85 | { 86 | "import" 87 | { 88 | #download template 89 | Write-Host -ForegroundColor Gray " ==>checking for latest $nestedesx_ver" 90 | $OVF = Receive-LABnestedesxtemplate -Destination (Join-Path $Sourcedir "OVA") -nestedesx_ver $nestedesx_ver 91 | $OVFfile = Get-Item $ovf 92 | $mastername = $OVFfile.BaseName 93 | if ($vmwareversion.Major -eq 14) 94 | { 95 | Write-Warning " running $($vmwareversion.ToString()),we try to avoid a OVF import Bug, trying a manual import" 96 | Expand-LABpackage -Archive $OVF -filepattern *.vmdk -destination "$Masterpath/$mastername" -Verbose -force 97 | Copy-Item "./template/$($nestedesx_ver)*.template" -Destination "$Masterpath/$mastername/$Mastername.vmx" 98 | $Template_VMX = get-vmx -Path "$Masterpath/$mastername" 99 | $Disk1 = $Template_VMX | Add-VMXScsiDisk -Diskname "$mastername-disk1.vmdk" -LUN 0 -Controller 0 100 | $Disk2 = $Template_VMX | Add-VMXScsiDisk -Diskname "$mastername-disk2.vmdk" -LUN 1 -Controller 0 -VirtualSSD 101 | $Disk3 = $Template_VMX | Add-VMXScsiDisk -Diskname "$mastername-disk3.vmdk" -LUN 2 -Controller 0 -VirtualSSD 102 | 103 | } 104 | else { 105 | $OVA = Import-VMXOVATemplate -OVA $ovf -acceptAllEulas -AllowExtraConfig -quiet -destination $MasterPath 106 | } 107 | # & $global:vmwarepath\OVFTool\ovftool.exe --lax --skipManifestCheck --acceptAllEulas --name=$mastername $ovf $PSScriptRoot # 108 | Write-Host -ForegroundColor White "Use `".\$($MyInvocation.MyCommand) -nestedesx_ver $nestedesx_ver `" to try defaults" 109 | } 110 | 111 | default 112 | { 113 | If ($ConfirmPreference -match "none") 114 | {$Confirm = $false} 115 | else 116 | {$Confirm = $true} 117 | $Builddir = $PSScriptRoot 118 | $Scriptdir = Join-Path $Builddir "Scripts" 119 | $BuildDomain = $Global:labdefaults.BuildDomain 120 | 121 | $Hostkey = $Global:labdefaults.HostKey 122 | $Gateway = $Global:labdefaults.Gateway 123 | $DefaultGateway = $Global:labdefaults.Defaultgateway 124 | $DNS1 = $Global:labdefaults.DNS1 125 | $DNS2 = $Global:labdefaults.DNS2 126 | $custom_domainsuffix = $Global:labdefaults.custom_domainsuffix 127 | Write-Verbose $MasterPath 128 | [System.Version]$subnet = $Subnet.ToString() 129 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 130 | $Builddir = $PSScriptRoot 131 | $Nodeprefix = "NestedESX" 132 | $MasterVMX = get-vmx -path $Masterpath | where {$_.VMXName -match "$nestedesx_ver"} 133 | 134 | 135 | if (!$MasterVMX) 136 | { 137 | write-Host -ForegroundColor Magenta "Could not find existing esxiovaMaster" 138 | return 139 | } 140 | Write-Host -ForegroundColor Gray " ==>Checking Base VM Snapshot" 141 | if (!$MasterVMX.Template) 142 | { 143 | $template = $MasterVMX | Set-VMXTemplate 144 | } 145 | $Basesnap = $MasterVMX | Get-VMXSnapshot -WarningAction SilentlyContinue| where Snapshot -Match "Base" 146 | 147 | if (!$Basesnap) 148 | { 149 | Write-Host -ForegroundColor Gray " ==>Base snap does not exist, creating now" 150 | $Basesnap = $MasterVMX | New-VMXSnapshot -SnapshotName Base 151 | } 152 | 153 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 154 | { 155 | $ipoffset = 80+$Node 156 | Write-Host -ForegroundColor Gray " ==>Checking VM $Nodeprefix$node already Exists" 157 | If (!(get-vmx -path $Nodeprefix$node -WarningAction SilentlyContinue)) 158 | { 159 | $NodeClone = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" | New-VMXlinkedClone -CloneName $Nodeprefix$node -Clonepath "$Builddir" 160 | foreach ($nic in 0..0) 161 | { 162 | $Netadater0 = $NodeClone | Set-VMXVnet -Adapter $nic -vnet $VMnet -WarningAction SilentlyContinue 163 | } 164 | [string]$ip="$($subnet.ToString()).$($ipoffset.ToString())" 165 | $config = Get-VMXConfig -config $NodeClone.config 166 | $config += "guestinfo.hostname = `"$($NodeClone.CloneName).$BuildDomain.$custom_domainsuffix`"" 167 | $config += "guestinfo.ipaddress = `"$ip`"" 168 | $config += "guestinfo.netmask = `"255.255.255.0`"" 169 | $config += "guestinfo.gateway = `"$Gateway`"" 170 | $config += "guestinfo.dns = `"$DNS1`"" 171 | $config += "guestinfo.domain = `"$Nodeprefix$Node.$BuildDomain.$custom_domainsuffix`"" 172 | $config += "guestinfo.ntp = `"$DNS1`"" 173 | $config += "guestinfo.ssh = `"true`"" 174 | $config += "guestinfo.syslog = `"$ip`"" 175 | $config += "guestinfo.password = `"$Password`"" 176 | $config += "guestinfo.createvmfs = `"false`"" 177 | $config | Set-Content -Path $NodeClone.config 178 | 179 | if ($Disks -ne 0) 180 | { 181 | $SCSI = 1 182 | [uint64]$Disksize = 100GB 183 | $NodeClone | Set-VMXScsiController -SCSIController 1 -Type lsilogic | Out-Null 184 | foreach ($LUN in (0..($Disks-1))) 185 | { 186 | if ($LUN -ge 7) 187 | { 188 | $LUN = $LUN+1 189 | } 190 | $Diskname = "SCSI$SCSI"+"_LUN$LUN.vmdk" 191 | $Newdisk = New-VMXScsiDisk -NewDiskSize $Disksize -NewDiskname $Diskname -Verbose -VMXName $NodeClone.VMXname -Path $NodeClone.Path 192 | $AddDisk = $NodeClone | Add-VMXScsiDisk -Diskname $Newdisk.Diskname -LUN $LUN -Controller $SCSI -VirtualSSD 193 | } 194 | } 195 | $result = $NodeClone | Set-VMXSize -Size $Size 196 | $result = $NodeClone | Set-VMXGuestOS -GuestOS vmkernel6 197 | $result = $NodeClone | Set-VMXVTBit -VTBit:$true 198 | $result = $NodeClone | Set-VMXDisplayName -DisplayName $NodeClone.CloneName 199 | $MainMem = $NodeClone | Set-VMXMainMemory -usefile:$false 200 | $Annotation = $Nodeclone | Set-VMXAnnotation -Line1 "Login Credentials" -Line2 "root" -Line3 "Password" -Line4 "$Password" 201 | $NodeClone | start-vmx | Out-Null 202 | Write-host 203 | Write-host -ForegroundColor White "==>Nested ESXi $($NodeClone.Clonename) Deployed successful,login with root/$Password at console or ssh:$($ip):22" 204 | Write-host -ForegroundColor White "==>The ESX UI can be reached at https://$($ip)/ui" 205 | } 206 | else 207 | { 208 | Write-Warning "Node $Nodeprefix$node already exists" 209 | } 210 | } 211 | }# end default 212 | } 213 | 214 | -------------------------------------------------------------------------------- /docs/student_guide.md: -------------------------------------------------------------------------------- 1 | s Student Guide is used to run labbuildr classes. 2 | Manadatory in each class is the preparation of Student Laptops/pc´s 3 | For Windows 10 users, please make sure no not use edge browser for copy paste operations 4 | 5 | This Guide is divided in Multiple Chapters 6 | * [Prerequirements](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#01-prerequirements) 7 | * [install and run labbuildr](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#10-install-and-run-labbuildr) 8 | * [defaults](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#12-adjusting-defaults) 9 | * [Running VM´s](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#13-running-vms) 10 | 11 | # 0.1 Prerequirements 12 | In this part, students check / install the required software 13 | requirements are 14 | * VMware Workstationversion 12 15 | * Powershell Version 3.0 or greater ( 4 gets installed in this guide ) 16 | * Virtualization enbled in Bios 17 | Check that VT Bit and virtualization is enabled in you Computers Bios 18 | ***For Lenovo:*** 19 | Press enter to interrupt Startup, the F1 for BIOS 20 | In Security enable both, Intel Virtualization Technology and VT-d Feature 21 | ## 0.1.0 VMware Workstation 12 22 | VMware Workstation 12 is recommended for the class. get you eval copy here [VMware 12 eval]( http://www.vmware.com/go/tryworkstation-win) 23 | EMCer can get their Licence Key here: [EMC VMware eval Keys](https://community.emc.com/docs/DOC-36202) ( login required ) 24 | 25 | ## 0.1.1 Check Powershell Version 26 | labbuildr uses powershell for all automation tasks. A minimum Version of 3.0 is required. 27 | to check the powershell version, use keyboard shortcut [WIN+R] to open a run prompt, and enter "powershell.exe" 28 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082305/27b8e622-5179-11e6-9800-f7ee6c4d6ada.png) 29 | a new powershell window opens. 30 | at the prompt, enter 31 | ```Powershell 32 | ($PSVersionTable).PSVersion -ge "3.0" 33 | ``` 34 | if the answer is "true", skip to [0.1.4 Execution Policy](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#014-execution-policy) 35 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082310/aa99e2c6-5179-11e6-8347-0ce2982b4fea.png) 36 | 37 | ## 0.1.2 Check .Net Framework 38 | Prereq for Powershell 3.0/4.0 is Net Framework 4.5 39 | ``` Powershell 40 | (Get-ItemProperty -Path 'HKLM:\Software\Microsoft\NET Framework Setup\NDP\v4\Full' -ErrorAction SilentlyContinue).Version -ge '4.5*' 41 | ``` 42 | if the answer is true, skip to step [0.1.3 Install Powershell](http://labbuildr.readthedocs.io/en/master/Solutionpacks///Student-Guide#013-install-powershell-40) 43 | for any other answers, download and run [.Net 4.5.2 Installer]($Url=http://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe") 44 | ## 0.1.3 install Powershell 4.0 45 | Powershell (4.0) is part of Windows Management Framework (WMF) 4.0. 46 | Download and run WMF 4.0 from here [WMF 4.0 x64](https://download.microsoft.com/download/3/D/6/3D61D262-8549-4769-A660-230B67E15B25/Windows6.1-KB2819745-x64-MultiPkg.msu) 47 | 48 | ## 0.1.4 Execution Policy 49 | Powershell resticts the execution of scripts with Execution Policy´s. Depending on your Version of OS, this might be a different setting. We need an unrestricted setting for labbuildr, to allow for run the downloaded code from GitHub. 50 | If you do not have a Powershell Windows Open, do so now with [WIN+R] powershell.exe 51 | enter 52 | ```Powershell 53 | Get-ExecutionPolicy 54 | ``` 55 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082394/c225b6e2-517c-11e6-9f9e-316a67e2cb8d.png) 56 | If the answer is not unrestricted, we have to set the execution policy. this can only be done as administrator. 57 | from the taskbar, right-click on your powershell session and select "Run as Administrator" 58 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082399/04bd889a-517d-11e6-9f11-b21ec0053abb.png) 59 | in the new powershell window, enter 60 | ```Powershell 61 | Set-ExecutionPolicy -ExecutionPolicy Unrestricted 62 | ``` 63 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082406/3a145c1c-517d-11e6-8626-7d39d91d297a.png) 64 | close the admin window. 65 | from the other powershell session, enter 66 | ```Powershell 67 | Get-ExecutionPolicy 68 | ``` 69 | _hint: use up / down keys_ 70 | it should be set to _unrestricted_ now 71 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082427/4831ce0a-517e-11e6-848a-343f3db854ce.png) 72 | ## 0.1.5 sign into labbuildr slack channel 73 | register yourself at http://community.emccode.com/ to get access to the emccode slack. 74 | once registered, join the labbuildr slack channel at https://codecommunity.slack.com/messages/labbuildr/ 75 | that way i can check students completed the prework. we will use slack during the class for shareing of snippets etc 76 | 77 | ![image](https://cloud.githubusercontent.com/assets/8255007/17097122/adf88290-525c-11e6-8d9d-0b834c6fd9b0.png) 78 | 79 | ## 0.1.6 Optional 80 | create your github account to be able to submit issues and 81 | do not Forget to star labbuildr :-) 82 | # 1.0 install and run labbuildr 83 | In this section Studends wll install labbuildr, review basic settings and get introduced to some basic commands 84 | 85 | ## 1.1 installation 86 | ### Install 87 | 88 | labbuildr can be installed using PowershellGet. If you are note running Windows 10, install PowershellGet from 89 | [Powershell Gallery](https://www.powershellgallery.com) 90 | 91 | ![Installation via Powershell Get](https://user-images.githubusercontent.com/8255007/27817547-0991ef12-6092-11e7-9f57-0860e5cb6c83.png) 92 | ### Fully automated Installation Using Powershell Get Method 93 | ```Powershell 94 | Install-Script install-labbuildr -Force -Scope CurrentUser 95 | install-labbuildr.ps1 -branch master 96 | ``` 97 | 98 | 99 | ### Fully automated Installation from powershell Using Download Method 100 | 101 | 102 | ## 1.2 run labbuildr 103 | double click on the labbuildr icon on your desktop 104 | ![image](https://cloud.githubusercontent.com/assets/8255007/17082705/d46c0c74-5187-11e6-9934-5b57f990d139.png) 105 | 106 | your labbuildr window should start. 107 | the actual version(s) will be displayed ( labdefaults ) 108 | If OpenWRT is not Available, it will be loaded and started 109 | 110 | ![image](https://cloud.githubusercontent.com/assets/8255007/20619716/4390133c-b2f6-11e6-8924-8345406edb18.png) 111 | 112 | some defaults can now be adjusted to your needs 113 | ## 1.2 adjusting defaults 114 | ## 1.2.1 Masterpath 115 | a central part of labbuildr are MASTER images, wich represent the Base for OS installations. 116 | to be space effective, linked clones are used. 117 | the MASTERS are stored in a Central repo. the default is c:\sharedmaster 118 | you can adjust the setting with 119 | ```Powershell 120 | Set-LABMasterpath -Masterpath [your path] 121 | ``` 122 | Note: use a fast ssd drive, and do NOT use usb, as disconnects will fail you VM. 123 | 124 | ## 1.2.2 Sources 125 | sources are the place where software for add on installations like SQL, Sharepoint, ScaleIO, Networker etc are downloaded to. 126 | Should be on a drive with enough space, USB Stick etc. UNC currently not tested. 127 | Default is c:\sources 128 | create the desired Directory with 129 | ```Powershell 130 | New-Item -ItemType Directory C:\sources 131 | ``` 132 | if you choose another path // stick, adjust with 133 | 134 | create the desired Directory with 135 | ```Powershell 136 | Set-LABSources d:\sources 137 | ``` 138 | ## 1.2.3 MySubnet 139 | 192.168.2.0 is default for all Machines Subnet 140 | ## 1.2.4 vmnet 141 | Virtual net used by labbuildr machines. doess not need to exist unless you want to connect to your machines from your host 142 | for host connection, add the netwwok using the vmware virtual network editor. Create vmnet2 with 143 | * dhcp disabled 144 | * connect host virtual adapter 145 | * subnet ip 192.168.2.0 146 | ![image](https://cloud.githubusercontent.com/assets/8255007/17090582/243470fc-5232-11e6-87f5-f8c576eb8690.png) 147 | 148 | ## 1.3 running vm´s 149 | in this chapter students will run / download their first vm(s) 150 | ## 1.3.1 OpenWRT 151 | OpenWRT is used as a tiny NAT gateway. it routes traffic from your vm´s subnet to the internet and allows VM´s to register ( windows 180 days license ) or download packages ( mainly linux ) 152 | to manually download an unzip OpenWRT use 153 | ```Powershell 154 | Receive-LABOpenWRT -start 155 | ``` 156 | ![image](https://cloud.githubusercontent.com/assets/8255007/17090679/193660ec-5233-11e6-8724-0f5b3102634e.png)once this will start you OpenWRT vm. 157 | ![image](https://cloud.githubusercontent.com/assets/8255007/17090792/6855e228-5234-11e6-9ad7-de0d5287a8c5.png) 158 | in the vm´s console, enter 159 | ```bash 160 | ifconfig eth1 161 | ``` 162 | this will show you the dhcp address received by your host 163 | ![image](https://cloud.githubusercontent.com/assets/8255007/17090840/d67ee196-5234-11e6-84f0-bb85aa812fc1.png) 164 | use this ip address ( or MySubnet.4) with your browser to connect to the admin interface 165 | ![image](https://cloud.githubusercontent.com/assets/8255007/17090880/2e162586-5235-11e6-8c5f-fd0dcf0e55fb.png) 166 | Login to the ui an be done with your Webbrowser with user root/Password123! 167 | ## 1.3.2 Build a domain controller 168 | to build the domain controller, follow 169 | [./Build-lab.ps1 -DConly](http://labbuildr.readthedocs.io/en/master/Scenarios/Build A Domain Controller) 170 | # 2.0 Managing VM´s 171 | get a list of all all labbuildr commands 172 | ```Powershell 173 | get-command -module labtools 174 | ``` 175 | getting a list of running vm´s 176 | ```Powershell 177 | get-vmx | where state -Match running | ft 178 | ``` 179 | -------------------------------------------------------------------------------- /labbuildr/install-centos.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-scaleio.ps1 4 | .DESCRIPTION 5 | install-centos7_4scaleio is the a vmxtoolkit solutionpack for configuring and deploying centos VM´s for ScaleIO Implementation 6 | 7 | Copyright 2014 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-centos.ps1 22 | .EXAMPLE 23 | #> 24 | [CmdletBinding(DefaultParametersetName = "install", 25 | SupportsShouldProcess=$true, 26 | ConfirmImpact="Medium")] 27 | Param( 28 | [Parameter(Mandatory = $False)] 29 | [AllowNull()] 30 | [AllowEmptyString()] 31 | [ValidateSet('cinnamon','none')] 32 | [string]$Desktop, 33 | [Parameter(Mandatory = $False)] 34 | [Switch]$epel 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | r, 43 | [Parameter(Mandatory = $false)] 44 | [ValidateSet('shipyard','uifd')][string[]]$container, 45 | [Parameter(Mandatory = $false)] 46 | [ValidateSet('influxdb','grafana')][string[]]$AdditionalPackages, 47 | [Parameter(ParameterSetName = "install",Mandatory=$False)] 48 | [ValidateRange(0,3)] 49 | [int]$SCSI_Controller = 0, 50 | [ValidateRange(0,5)] 51 | [int]$SCSI_DISK_COUNT = 0, 52 | [Parameter(ParameterSetName = "install",Mandatory = $false)] 53 | [ValidateSet('Centos7_3_1611','Centos7_1_1511','Centos7_1_1503')] 54 | [string]$centos_ver = 'Centos7_3_1611', 55 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 56 | [ValidateRange(1,4)] 57 | [int32]$Nodes=1, 58 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 59 | [int32]$Startnode = 1, 60 | [int]$ip_startrange = 205, 61 | <# 62 | Size 63 | 'XS' = 1vCPU, 512MB 64 | 'S' = 1vCPU, 768MB 65 | 'M' = 1vCPU, 1024MB 66 | 'L' = 2vCPU, 2048MB 67 | 'XL' = 2vCPU, 4096MB 68 | 'TXL' = 4vCPU, 6144MB 69 | 'XXL' = 4vCPU, 8192MB 70 | #> 71 | [ValidateSet('XS', 'S', 'M', 'L', 'XL','TXL','XXL')]$Size = "XL", 72 | $Nodeprefix = "centos", 73 | [Parameter(Mandatory=$false)] 74 | $Scriptdir = (join-path (Get-Location) "labbuildr-scripts"), 75 | [Parameter(Mandatory=$false)] 76 | $Sourcedir = $Global:labdefaults.Sourcedir, 77 | [Parameter(Mandatory=$false)] 78 | $DefaultGateway = $Global:labdefaults.DefaultGateway, 79 | [Parameter(Mandatory=$false)] 80 | $guestpassword = "Password123!", 81 | $Rootuser = 'root', 82 | $Hostkey = $Global:labdefaults.HostKey, 83 | $Default_Guestuser = 'labbuildr', 84 | [Parameter(Mandatory=$false)] 85 | $Subnet = $Global:labdefaults.MySubnet, 86 | [Parameter(Mandatory=$false)] 87 | $DNS1 = $Global:labdefaults.DNS1, 88 | [Parameter(Mandatory=$false)] 89 | $DNS2 = $Global:labdefaults.DNS2, 90 | [Parameter(Mandatory=$false)] 91 | $Host_Name = $VMXName, 92 | $DNS_DOMAIN_NAME = "$($Global:labdefaults.BuildDomain).$($Global:labdefaults.Custom_DomainSuffix)", 93 | [switch]$Defaults, 94 | [switch]$vtbit = $false 95 | ) 96 | #requires -version 3.0 97 | #requires -module vmxtoolkit 98 | ###standard labbuildr init### 99 | if ($Defaults.IsPresent) 100 | { 101 | Deny-LABDefaults 102 | Break 103 | } 104 | $ip_startrange = $ip_startrange-1 105 | [Uint64]$SCSI_DISK_SIZE = 100GB 106 | $SCSI_Controller_Type = "pvscsi" 107 | If ($ConfirmPreference -match "none") 108 | {$Confirm = $false} 109 | else 110 | {$Confirm = $true} 111 | $Builddir = $PSScriptRoot 112 | $Logfile = "/tmp/labbuildr.log" 113 | if (!$DNS2) 114 | { 115 | $DNS2 = $DNS1 116 | } 117 | $OS = "Centos" 118 | switch ($centos_ver) 119 | { 120 | "7" 121 | { 122 | $netdev = "eno16777984" 123 | $Required_Master = "$OS$centos_ver Master" 124 | $Guestuser = "stack" 125 | } 126 | default 127 | { 128 | $netdev= "eno16777984" 129 | $Required_Master = "$OS$centos_ver" 130 | $Guestuser = "labbuildr" 131 | } 132 | } 133 | [System.Version]$subnet = $Subnet.ToString() 134 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 135 | [uint64]$Disksize = 100GB 136 | ####Build Machines###### cecking for linux binaries 137 | ####Build Machines# 138 | $StopWatch = [System.Diagnostics.Stopwatch]::StartNew() 139 | $Epel_Packages = @() 140 | if ($docker.IsPresent -or $container) 141 | { 142 | $Epel_Packages += "docker" 143 | } 144 | if ($Desktop -contains 'cinnamon') 145 | { 146 | $Epel_Packages += "generic" 147 | } 148 | if ($AdditionalPackages -contains 'influxdb') 149 | { 150 | $Epel_Packages += "influxdb" 151 | } 152 | if ($AdditionalPackages -contains 'grafana') 153 | { 154 | $Epel_Packages += "grafana" 155 | } 156 | 157 | #$Epel_Packages = $Epel_Packages -join "," 158 | $machinesBuilt = @() 159 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 160 | { 161 | Write-Host -ForegroundColor White "Checking for $Nodeprefix$node" 162 | $Lab_VMX = "" 163 | $Lab_VMX = New-LabVMX -CentOS -CentOS_ver $centos_ver -Size $Size -SCSI_DISK_COUNT $SCSI_DISK_COUNT -SCSI_DISK_SIZE $Disksize -VMXname $Nodeprefix$Node -SCSI_Controller $SCSI_Controller -vtbit:$vtbit -start 164 | if ($Lab_VMX) 165 | { 166 | $temp_object = New-Object System.Object 167 | $temp_object | Add-Member -type NoteProperty -name Name -Value $Nodeprefix$Node 168 | $temp_object | Add-Member -type NoteProperty -name Number -Value $Node 169 | $machinesBuilt += $temp_object 170 | } 171 | else 172 | { 173 | Write-Warning "Machine $Nodeprefix$Node already exists" 174 | } 175 | 176 | } 177 | if ($PSCmdlet.MyInvocation.BoundParameters["verbose"].IsPresent) 178 | { 179 | Write-verbose "Now Pausing" 180 | pause 181 | } 182 | Write-Host -ForegroundColor White "Starting Node Configuration" 183 | 184 | foreach ($Node in $machinesBuilt) 185 | { 186 | $ip_byte = ($ip_startrange+$Node.Number) 187 | $ip="$subnet.$ip_byte" 188 | $Nodeclone = Get-VMX $Node.Name 189 | Write-Verbose "Configuring Node $($Node.Number) $($Node.Name) with $IP" 190 | $Hostname = $Nodeclone.vmxname.ToLower() 191 | $Nodeclone | Set-LabCentosVMX -ip $IP -CentOS_ver $centos_ver -Additional_Epel_Packages $Epel_Packages -Host_Name $Hostname -DNS1 $DNS1 -DNS2 $DNS2 -VMXName $Nodeclone.vmxname 192 | if ("shipyard" -in $container) 193 | { 194 | $Scriptblock = "curl -s https://shipyard-project.com/deploy | bash -s" 195 | Write-Verbose $Scriptblock 196 | $Bashresult = $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword -logfile $Logfile 197 | $installmessage += " ==>you can use shipyard with http://$($ip):8080 with user admin/shipyard`n" 198 | } 199 | if ("uifd" -in $container) 200 | { 201 | $Scriptblock = "docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker" 202 | Write-Verbose $Scriptblock 203 | $Bashresult = $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword -logfile $Logfile 204 | $installmessage += " ==>you can use container uifd with http://$($ip):9000`n" 205 | } 206 | 207 | if ($Desktop) 208 | { 209 | Write-Host -ForegroundColor Gray " ==>Installing X-Windows environment" 210 | $Scriptblock = "yum groupinstall -y `'X Window system'" 211 | Write-Verbose $Scriptblock 212 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 213 | } 214 | switch ($Desktop) 215 | { 216 | 'cinnamon' 217 | { 218 | Write-Host -ForegroundColor Gray " ==>Installing Display Manager" 219 | $Scriptblock = "yum install -y lightdm cinnamon gnome-desktop3 firefox" 220 | Write-Verbose $Scriptblock 221 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 222 | $Scriptblock = "yum groupinstall gnome -y" 223 | Write-Verbose $Scriptblock 224 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 225 | $Scriptblock = "systemctl set-default graphical.target" 226 | Write-Verbose $Scriptblock 227 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 228 | $Scriptblock = "rm '/etc/systemd/system/default.target'" 229 | Write-Verbose $Scriptblock 230 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 231 | $Scriptblock = "ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'" 232 | Write-Verbose $Scriptblock 233 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword | Out-Null 234 | $Scriptblock = "/usr/bin/vmware-config-tools.pl -d;shutdown -r now" 235 | Write-Verbose $Scriptblock 236 | $NodeClone | Invoke-VMXBash -Scriptblock $Scriptblock -Guestuser $Rootuser -Guestpassword $Guestpassword -nowait| Out-Null 237 | } 238 | default 239 | { 240 | } 241 | } 242 | }#end machines 243 | $StopWatch.Stop() 244 | Write-host -ForegroundColor White "Deployment took $($StopWatch.Elapsed.ToString())" 245 | write-Host -ForegroundColor White "Login to the VM´s with root/Password123!" 246 | Write-Host "Created $($machinesBuilt.Name -join ',') with current run" 247 | -------------------------------------------------------------------------------- /labbuildr/install-coreos.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .Synopsis 3 | .\install-coreos.ps1 4 | .DESCRIPTION 5 | install-coreos is the a vmxtoolkit solutionpack installing coreos to run docker containers 6 | 7 | Copyright 2015 Karsten Bott 8 | 9 | Licensed under the Apache License, Version 2.0 (the "License"); 10 | you may not use this file except in compliance with the License. 11 | You may obtain a copy of the License at 12 | 13 | http://www.apache.org/licenses/LICENSE-2.0 14 | 15 | Unless required by applicable law or agreed to in writing, software 16 | distributed under the License is distributed on an "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | See the License for the specific language governing permissions and 19 | limitations under the License. 20 | .LINK 21 | http://labbuildr.readthedocs.io/en/master/Solutionpacks///SolutionPacks#install-coreos 22 | .EXAMPLE 23 | .\install-coreos.ps1 -defaults 24 | this will install a Puppetmaster on CentOS7 using default Values derived from defaults.json 25 | 26 | #> 27 | # 28 | [CmdletBinding(DefaultParametersetName = "defaults")] 29 | Param( 30 | [Parameter(ParameterSetName = "defaults", Mandatory = $true)][switch]$Defaults, 31 | [Parameter(ParameterSetName = "install",Mandatory=$false)] 32 | [ValidateScript({ Test-Path -Path $_ -ErrorAction SilentlyContinue })]$Sourcedir, 33 | [Parameter(ParameterSetName = "install",Mandatory=$false)][ValidateScript({$_ -match [IPAddress]$_ })][ipaddress]$subnet = "192.168.2.0", 34 | [Parameter(ParameterSetName = "install",Mandatory=$False)] 35 | [ValidateLength(1,15)][ValidatePattern("^[a-zA-Z0-9][a-zA-Z0-9-]{1,15}[a-zA-Z0-9]+$")][string]$BuildDomain = "labbuildr", 36 | [Parameter(ParameterSetName = "install",Mandatory = $false)][ValidateSet('vmnet1', 'vmnet2','vmnet3')]$vmnet = "vmnet2", 37 | [Parameter(ParameterSetName = "defaults", Mandatory = $false)][ValidateScript({ Test-Path -Path $_ })]$Defaultsfile="./defaults.json", 38 | [Parameter(ParameterSetName = "download", Mandatory = $true)][switch]$download, 39 | [Parameter(ParameterSetName = "import",Mandatory=$true)][switch]$Import, 40 | [Parameter(ParameterSetName = "import",Mandatory=$false)] 41 | [Parameter(ParameterSetName = "defaults",Mandatory=$false)] 42 | [Parameter(ParameterSetName = "download", Mandatory = $false)][ValidateSet('stable', 'alpha','beta')]$version = 'Stable', 43 | $Nodes = 3 44 | ) 45 | #requires -version 3.0 46 | #requires -module vmxtoolkit 47 | 48 | $ovf = "coreos_$version.ova" 49 | $masterpath = (get-labdefaults).Masterpath 50 | $Master = "$masterpath/coreos_$Version" 51 | switch ($PsCmdlet.ParameterSetName) 52 | { 53 | 54 | "download" 55 | { 56 | $CoreOSURL = "http://$version.release.core-os.net/amd64-usr/current/coreos_production_vmware_ova.ova" 57 | 58 | 59 | Try 60 | { 61 | test-Path $Sourcedir 62 | } 63 | Catch 64 | { 65 | Write-Verbose $_ 66 | Write-Warning "We need a Valid Sourcedir, trying Defaults" 67 | if (!($Sourcedir = (Get-labDefaults).Sourcedir)) 68 | { 69 | Write-Warning "no sourcedir Specified" 70 | exit 71 | } 72 | } 73 | $Target = join-path $Sourcedir $ovf 74 | Write-Host "Trying Download of $ovf" 75 | Receive-LABBitsFile -DownLoadUrl $CoreOSURL -destination $Target 76 | Write-Host "Now run install-coreos.ps1 -import -version $version" 77 | 78 | 79 | } 80 | "import" 81 | { 82 | if (!$Masterpath) 83 | { 84 | try 85 | { 86 | $Masterpath = (get-labdefaults).Masterpath 87 | } 88 | catch 89 | { 90 | Write-Host -ForegroundColor Gray " ==> No Masterpath specified, trying default" 91 | $Masterpath = $Builddir 92 | } 93 | } 94 | Try 95 | { 96 | test-Path $Sourcedir 97 | } 98 | Catch 99 | { 100 | Write-Verbose $_ 101 | Write-Warning "We need a Valid Sourcedir, trying Defaults" 102 | if (!($Sourcedir = (Get-labDefaults).Sourcedir)) 103 | { 104 | Write-Warning "no sourcedir Specified" 105 | exit 106 | } 107 | $Target = join-path $Sourcedir $ovf 108 | 109 | if (!(($Mymaster = Get-Item $Target -ErrorAction SilentlyContinue).Extension -match "ovf" -or "ova")) 110 | { 111 | Write-Warning "No valid ov[fa] found, Please try -download [-version]" 112 | Exit 113 | } 114 | else 115 | { 116 | $Mastername = $Mymaster.Basename 117 | } 118 | 119 | Write-Host -ForegroundColor Gray " ==>Importing $OVF, this may take a While" 120 | import-VMXOVATemplate -OVA $Target -destination $Masterpath | Out-Null 121 | Write-Host " ==>Now run ./install-coreos.ps1 -defaults -version $Version" 122 | } 123 | 124 | 125 | } 126 | 127 | 128 | default 129 | { 130 | $Nodeprefix = "CoreOSNode" 131 | $Startnode = 1 132 | New-Item -ItemType Directory ./labbuildr-scripts/CoreOS/config-drive/openstack/latest -Force | Out-Null 133 | If ($Defaults.IsPresent) 134 | { 135 | $labdefaults = Get-labDefaults 136 | $vmnet = $labdefaults.vmnet 137 | $subnet = $labdefaults.MySubnet 138 | $BuildDomain = $labdefaults.BuildDomain 139 | $DefaultGateway = $labdefaults.DefaultGateway 140 | $Hostkey = $labdefaults.HostKey 141 | $DNS1 = $labdefaults.DNS1 142 | $DefaultGateway = $labdefaults.Defaultgateway 143 | $Masterpath = $labdefaults.Masterpath 144 | } 145 | 146 | [System.Version]$subnet = $Subnet.ToString() 147 | $Subnet = $Subnet.major.ToString() + "." + $Subnet.Minor + "." + $Subnet.Build 148 | 149 | 150 | If (!($MasterVMX = get-vmx -path $Master -WarningAction SilentlyContinue)) 151 | { 152 | Write-Error "No Valid Master Found" 153 | break 154 | } 155 | 156 | 157 | $Basesnap = $MasterVMX | Get-VMXSnapshot -WarningAction SilentlyContinue | where Snapshot -Match "Base" 158 | if (!$Basesnap) 159 | { 160 | Write-verbose "Base snap does not exist, creating now" 161 | $Basesnap = $MasterVMX | New-VMXSnapshot -SnapshotName BASE | Out-Null 162 | if (!$MasterVMX.Template) 163 | { 164 | write-verbose "Templating Master VMX" 165 | $template = $MasterVMX | Set-VMXTemplate | Out-Null 166 | } 167 | } 168 | foreach ($Node in $Startnode..(($Startnode-1)+$Nodes)) 169 | { 170 | if (!(get-vmx $Nodeprefix$node -WarningAction SilentlyContinue)) 171 | { 172 | write-verbose "Creating $Nodeprefix$node" 173 | $NodeClone = $MasterVMX | Get-VMXSnapshot | where Snapshot -Match "Base" | New-VMXLinkedClone -CloneName $Nodeprefix$Node 174 | $IP = "$subnet.4$Node" 175 | 176 | $User_data= "#cloud-config 177 | hostname: $($nodeclone.clonename) 178 | ssh_authorized_keys: 179 | - $($Hostkey) 180 | write_files: 181 | - path: /etc/systemd/network/static.network 182 | permissions: 0644 183 | content: | 184 | [Match] 185 | Name=eno16777984 186 | 187 | [Network] 188 | Address=$IP/24 189 | Gateway=$DefaultGateway 190 | DNS=$DNS1 191 | DNS=8.8.8.8 192 | - path: /etc/iptables.rules 193 | permissions: 0644 194 | content: | 195 | *filter 196 | :INPUT DROP [0:0] 197 | :FORWARD ACCEPT [0:0] 198 | :OUTPUT ACCEPT [76:7696] 199 | -A INPUT -p tcp -m conntrack --ctstate NEW -m multiport --dports 22 -j ACCEPT 200 | -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 201 | -A INPUT -i lo -j ACCEPT 202 | -A INPUT -p icmp --icmp-type 8 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT 203 | -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT 204 | COMMIT 205 | coreos: 206 | units: 207 | - name: systemd-networkd.service 208 | command: restart 209 | - name: iptables.service 210 | command: start 211 | content: | 212 | [Unit] 213 | Description=iptables 214 | Author=Me 215 | After=systemd-networkd.service 216 | 217 | [Service] 218 | Type=oneshot 219 | ExecStart=/usr/sbin/iptables-restore /etc/iptables.rules 220 | ExecReload=/usr/sbin/iptables-restore /etc/iptables.rules 221 | ExecStop=/usr/sbin/iptables-restore /etc/iptables.rules 222 | 223 | [Install] 224 | WantedBy=multi-user.target" 225 | 226 | $User_data | Set-Content -Path "$PSScriptRoot/labbuildr-scripts/CoreOS/config-drive/openstack/latest/user_data" | Out-Null 227 | convert-VMXdos2unix -Sourcefile "$PSScriptRoot/labbuildr-scripts/CoreOS/config-drive/openstack/latest/user_data" | Out-Null 228 | Write-Host -ForegroundColor Gray " ==>Creating config-2 CD" 229 | .$global:mkisofs -r -V config-2 -o "$($NodeClone.path)/config.iso" "$PSScriptRoot/Scripts/CoreOS/config-drive" # | Out-Null 230 | 231 | $NodeClone | Connect-VMXcdromImage -ISOfile "$($NodeClone.path)/config.iso" -Contoller ide -Port 1:0 | Out-Null 232 | $NodeClone | Set-VMXNetworkAdapter -Adapter 0 -ConnectionType custom -AdapterType vmxnet3 -WarningAction SilentlyContinue | Out-Null 233 | $NodeClone | Set-VMXVnet -Adapter 0 -Vnet $vmnet -WarningAction SilentlyContinue | Out-Null 234 | $NodeClone | Set-VMXDisplayName -DisplayName "$($NodeClone.Clonename)@$BuildDomain" | Out-Null 235 | $Content = $Nodeclone | Get-VMXConfig 236 | $Content = $Content -replace 'preset','soft' 237 | $Content | Set-Content -Path $NodeClone.config 238 | $NodeClone | start-vmx | Out-Null 239 | }#end machine 240 | 241 | else 242 | { 243 | Write-Warning "Machine already exists" 244 | } 245 | 246 | 247 | }#end foreach 248 | 249 | }#end default 250 | } 251 | 252 | 253 | -------------------------------------------------------------------------------- /docs/Solutionpacks/install-unity.ps1.md: -------------------------------------------------------------------------------- 1 | ## install-unity 2 | install-unity is the import / installation tool for emc unity vsa 3 | ## requirements 4 | > Processor : 2 5 | Memory : 12288 6 | VirtualMemory : 12562 7 | PhysicalMemory : 8095 8 | 9 | 10 | the installation runs in 3 steps 11 | * [import](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-unity.ps1#import) 12 | * [install](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-unity.ps1#install) 13 | * [initial setup wizard](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-unity.ps1#starting-the-initial-installation-wizard) 14 | 15 | also, view the [options](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-unity.ps1#options) for unity install 16 | for labbuildr windows machines, there is a powershell script to configure iSCSI 17 | * [labbuildr-iscsi](http://labbuildr.readthedocs.io/en/master/Solutionpacks///install-unity.ps1#labbuildr-iscsi) 18 | 19 | ## import 20 | you must download you version of unity vsa from http://www.emc.com/products-solutions/trial-software-download/unity-vsa.htm 21 | a login / registration is required for download, that is why an automatic download is not provided. 22 | once the download has finished, simply enter 23 | ```Powershell 24 | .\install-unity.ps1 -ovf D:\EMC_VAs\UnityVSA-4.0.0.7329527.ova 25 | ``` 26 | where -ovf specifies the path to your downloaded OVA file 27 | 28 | labbuildr then uses vmxtoolkit to convert the OVA image to a vmware workstation format. you can ignore the warnings 29 | 30 | ![image](https://cloud.githubusercontent.com/assets/8255007/17103322/17b92e8e-527e-11e6-9e26-560b8059eff5.png) 31 | 32 | once finished, the command to continue with install is displayed 33 | ## fully automated install ( configures System with user / Password / eula ) 34 | 35 | for easy install, just use 36 | ```Powershell 37 | .\install-unity.ps1 -Defaults -configure 38 | ``` 39 | you may also add an existing lic file if you re-install a previous registered system 40 | ```Powershell 41 | .\install-unity.ps1 -Defaults -configure -Lic_file D:\Downloads\564D1FA6-F3C4-A7BC-EC74-D7943BC7ABB 42 | A_2777136_15-Jul-2016.lic 43 | ``` 44 | ![unity_labbuildr_way](https://cloud.githubusercontent.com/assets/8255007/17815471/bc0112f8-6634-11e6-9b5d-df075bdd10f4.gif) 45 | ## install 46 | for easy install, just use 47 | ```Powershell 48 | .\install-unity.ps1 -Defaults 49 | ``` 50 | a new linked clone is created, drives are added ( a default of 2 drives, may be customized ) 51 | 52 | ![image](https://cloud.githubusercontent.com/assets/8255007/17103417/7b6a2816-527e-11e6-9da7-69a5d8960707.png) 53 | 54 | allow for the vm to boot, than start with the displayed confif commands on the vm console. 55 | from the console, login with service/service and run 56 | ```bash 57 | svc_initial_config -4 "192.168.2.85 255.255.255.0 192.168.2.4" 58 | ``` 59 | where adding your specific IP requirements 60 | 61 | the command may fail, if the system is not fully initialized. Just wait some more minites and repeat 62 | ![image](https://cloud.githubusercontent.com/assets/8255007/17103703/eeeabe76-527f-11e6-8c06-04ef201aee98.png) 63 | once the configuration was sucessfull, you can proceed with your browser to configure unity 64 | ![image](https://cloud.githubusercontent.com/assets/8255007/17103809/68ef5d30-5280-11e6-8aa1-65a9c2a71bdb.png) 65 | 66 | ### starting the initial installation wizard 67 | login to https://unity_ip:443 with admin/Password123# 68 | 69 | ![image](https://cloud.githubusercontent.com/assets/8255007/17103898/d51ac1fc-5280-11e6-97f7-c340c3524e2e.png) 70 | 71 | the installation wizard will welcome you 72 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126207/44063540-52fb-11e6-8c4f-89b95b3ecea0.png) 73 | Accept the license agreement 74 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126228/76a4b6d4-52fb-11e6-9672-74c9413dd866.png) 75 | change your password (s) 76 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126237/9070af1e-52fb-11e6-815e-1630f287db54.png) 77 | upload your licensefile 78 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126241/98f1e31a-52fb-11e6-974f-154e8e554f57.png) 79 | view results 80 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126245/a5f93ef0-52fb-11e6-82c7-04477b04b654.png) 81 | continue to with the wizard 82 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126253/bc8dab88-52fb-11e6-9ba8-19b114facf1f.png) 83 | 84 | add your dns servers 85 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126259/c568380e-52fb-11e6-9bc7-11ba1dea7695.png) 86 | proceed to create pools 87 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126268/e0a57226-52fb-11e6-9851-afbda60a1c5f.png) 88 | 89 | 90 | 91 | specify a name for the new pool to be created 92 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126452/bf2357b0-52fd-11e6-9e24-82b1532fdca3.png) 93 | assign available drives to their tiers 94 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126613/1b533c3e-52ff-11e6-88db-b2419d7ba699.png) 95 | and then select a tier from the abvailable tiers 96 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126642/4f4834ea-52ff-11e6-96bf-a8a7934376dc.png) 97 | select the virtual disks to use 98 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126655/7e058710-52ff-11e6-8dae-28c8c2b66918.png) 99 | review your selection 100 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126663/8aca18bc-52ff-11e6-866b-655d519ce0f9.png) 101 | wait for the pool wizard to finish creation 102 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126674/a499625c-52ff-11e6-88b2-47c64cee7dc2.png) 103 | procced to next step 104 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126680/ae0fa148-52ff-11e6-92be-d1f03ca6d24b.png) 105 | click the + sign to add iSCSI interfaces 106 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126699/d19c2af0-52ff-11e6-8636-a6cdad2873e3.png) 107 | fill in the information, this example is a labbuildr default setup: 108 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126707/e558bca2-52ff-11e6-8c5c-38151d435ac4.png) 109 | finish the iSCSI Wizard 110 | we skip the nas wizard for now and quit to get to the Unity Dashboard 111 | ![image](https://cloud.githubusercontent.com/assets/8255007/17126875/76027af8-5301-11e6-8191-465b2390ddc0.png) 112 | 113 | ## labbuildr-iscsi 114 | to enable / register iscsi targets with your labbuildr [windows] hosts, a helper script is available. open a labbuildr command prompt from the desktop link.cd into the node directoy and run 115 | ```Powershell 116 | .\enable-labiscsi.ps1 -target_ip 192.168.2.201 117 | ``` 118 | where target_ip should represent the Target IP you specified for unity. 119 | proceed in your unisphere management station. 120 | ##register initiator 121 | go to access-->iscsi. you should see your newly registered iscsi connection(s) 122 | ![image](https://cloud.githubusercontent.com/assets/8255007/17141183/7b2c9424-534b-11e6-891b-06db37479695.png) 123 | from access-->host add a new iSCSI host: 124 | enter the host name 125 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142115/3a513366-534f-11e6-937a-4d97abab33a7.png) 126 | specify type an ip address 127 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142149/5b684698-534f-11e6-822e-fd465ba95376.png) 128 | select initiator from the list 129 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142184/76d2221e-534f-11e6-8530-feba01cf88f3.png) 130 | review settings and finish 131 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142254/bb6fd56a-534f-11e6-83e8-7b196c40fbc8.png) 132 | once completed, the initiatore is registered and ready to acces luns 133 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142298/e72d583a-534f-11e6-974e-885df599a507.png) 134 | the initiator should have a green checkmark now 135 | ![image](https://cloud.githubusercontent.com/assets/8255007/17142303/ec4a9404-534f-11e6-80ba-7e228068e949.png) 136 | 137 | ##create and map lun(s) 138 | in the unity ui go to storage-->block-->LUNs and click the + sign 139 | enter lun name and description 140 | ![image](https://cloud.githubusercontent.com/assets/8255007/17150425/b670660e-536f-11e6-937f-4971fc11c3eb.png) 141 | select pool and size 142 | ![image](https://cloud.githubusercontent.com/assets/8255007/17150650/8523213a-5370-11e6-8a44-7da66bfcb6e2.png) 143 | in configure access, add desired host 144 | ![image](https://cloud.githubusercontent.com/assets/8255007/17150699/b98547b4-5370-11e6-8981-f18cec8cc139.png) 145 | 146 | finish the wizard without adding replica´s or snapshots´s 147 | ![image](https://cloud.githubusercontent.com/assets/8255007/17150913/93a2ddee-5371-11e6-829d-89de8c3825ca.png) 148 | 149 | from the host, use diskpart/powershel/diskmgmt.msc to add the new disk 150 | 151 | 152 | 153 | 154 | ##options 155 | 156 | Fully Automated installs require an existing license. The Fully Automated installs can pre-Configure Hosts, LUN and NAS Servers for Cifs and NFS, and pre -register iSCSI Hosts. This can be usefull in conjunction with other Scenario´s, such as Exchange 2016 or OpenStack. 157 | 158 | 159 | Example 160 | ```Powershell 161 | .\install-unity.ps1 -Defaults -MasterPath C:\Users\bottk\Master.labbuildr\UnityVSA-4.0.1.8404134\ -Lic_file .\564d9f7d-aa2a-deb6-569c-fdaa02d2e732_2871812_24-Oct-2016.lic -configure -Disks 6 -iscsi_hosts E2016 -Protocols iscsi 162 | ``` 163 | this will configure a unity System including iSCSI Target Port 164 | -iscsi_hosts will configure a set of Example Hosts and Luns ( DCnode, Exchange 2016, AlwaysOn ) 165 | 166 | ![image](https://cloud.githubusercontent.com/assets/8255007/19850476/fa0ba09c-9f58-11e6-8259-ea9372c331e4.png) 167 | 168 | 169 | ``` 170 | Powershell 171 | SYNTAX 172 | C:\labbuildr2016\install-unity.ps1 [-Disks ] [] 173 | 174 | C:\labbuildr2016\install-unity.ps1 -ovf [-Mastername ] [-MasterPath ] [-Disks ] [] 175 | 176 | C:\labbuildr2016\install-unity.ps1 -Mastername -MasterPath [-subnet ] [-BuildDomain ] [-VMnet 177 | ] [-Disks ] [] 178 | 179 | C:\labbuildr2016\install-unity.ps1 [-Mastername ] [-MasterPath ] -Defaults [-Defaultsfile ] [-Disks ] 180 | [] 181 | ``` --------------------------------------------------------------------------------