Skip to content

Commit

Permalink
Merge branch master
Browse files Browse the repository at this point in the history
  • Loading branch information
gusztavvargadr committed Mar 20, 2019
2 parents 907f5e2 + 2d8b511 commit a099639
Show file tree
Hide file tree
Showing 75 changed files with 191 additions and 864 deletions.
7 changes: 2 additions & 5 deletions Berksfile.core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ def gusztavvargadr_packer_sources

gusztavvargadr_packer_cookbook 'w'
gusztavvargadr_packer_cookbook 'w10e'
gusztavvargadr_packer_cookbook 'w16s'
gusztavvargadr_packer_cookbook 'w16sc'
gusztavvargadr_packer_cookbook 'w1809de'
gusztavvargadr_packer_cookbook 'w1809ss'
gusztavvargadr_packer_cookbook 'w1809ssc'
gusztavvargadr_packer_cookbook 'ws2019s'
gusztavvargadr_packer_cookbook 'ws2019sc'

gusztavvargadr_packer_cookbook 'dc'
gusztavvargadr_packer_cookbook 'de'
Expand Down
211 changes: 78 additions & 133 deletions README.md

Large diffs are not rendered by default.

68 changes: 29 additions & 39 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,51 +21,41 @@ VagrantProvider.defaults_include(
)

def version
'1811.0.0'
'1901.0.0'
end

VagrantDeployment.configure(directory, 'environment' => 'packer') do |deployment|
VagrantDeployment.configure(directory, 'stack' => 'packer') do |deployment|
# windows-10
create_packer_windows_vms(deployment, 'w10e')
create_packer_windows_vms(deployment, 'w10e-dc')
create_packer_windows_vms(deployment, 'w10e-dc-vs17c')
create_packer_windows_vms(deployment, 'w10e-dc-vs17p')
# create_packer_windows_vms(deployment, 'windows10')
# create_packer_windows_vms(deployment, 'visualstudio2017')

create_packer_windows_vms(deployment, 'w16s')
create_packer_windows_vms(deployment, 'w16s-dc')
create_packer_windows_vms(deployment, 'w16s-dc-vs17c')
create_packer_windows_vms(deployment, 'w16s-dc-vs17p')
create_packer_windows_vms(deployment, 'w16s-iis')
create_packer_windows_vms(deployment, 'w16s-sql14d')
create_packer_windows_vms(deployment, 'w16s-sql17d')
# create_packer_windows_vms(deployment, 'windowsserver2016')
# create_packer_windows_vms(deployment, 'w16s-de')

create_packer_windows_vms(deployment, 'w16sc')
create_packer_windows_vms(deployment, 'w16sc-de')
# create_packer_windows_vms(deployment, 'windowsservercore2016')

create_packer_windows_vms(deployment, 'w1809de')
# create_packer_windows_vms(deployment, 'w1809de-dc')
# create_packer_windows_vms(deployment, 'w1809de-dc-vs17c')
# create_packer_windows_vms(deployment, 'w1809de-dc-vs17p')

create_packer_windows_vms(deployment, 'w1809ss')
# create_packer_windows_vms(deployment, 'w1809ss-dc')
# create_packer_windows_vms(deployment, 'w1809ss-dc-vs17c')
# create_packer_windows_vms(deployment, 'w1809ss-dc-vs17p')

create_packer_windows_vms(deployment, 'w1809ssc')
create_packer_windows_vms(deployment, 'w1809ssc-de')

# windows-server
create_packer_windows_vms(deployment, 'ws2019s')
create_packer_windows_vms(deployment, 'ws2019sc')

# ubuntu-desktop
create_packer_linux_vms(deployment, 'u16d')

# ubuntu-server
create_packer_linux_vms(deployment, 'u16s')

# docker-windows
create_packer_windows_vms(deployment, 'ws2019sc-de')

# docker-linux
create_packer_linux_vms(deployment, 'u16s-dc')
# create_packer_linux_vms(deployment, 'ubuntuserver16')

create_packer_linux_vms(deployment, 'u16d')
create_packer_linux_vms(deployment, 'u16d-dc')
# create_packer_linux_vms(deployment, 'ubuntudesktop16')
# iis
create_packer_windows_vms(deployment, 'ws2019s-iis')

# sql-server
create_packer_windows_vms(deployment, 'ws2019s-sql17d')

# visual-studio
create_packer_windows_vms(deployment, 'w10e-dc-vs17c')
create_packer_windows_vms(deployment, 'w10e-dc-vs17p')

create_packer_windows_vms(deployment, 'ws2019s-dc-vs17c')
create_packer_windows_vms(deployment, 'ws2019s-dc-vs17p')
end

def create_packer_windows_vms(deployment, name)
Expand All @@ -74,7 +64,7 @@ def create_packer_windows_vms(deployment, name)
end

def create_packer_linux_vms(deployment, name)
create_local_packer_vm(deployment, name)
create_local_packer_vm(deployment, name, 'sysprep')
create_cloud_packer_vm(deployment, name)
end

Expand Down
108 changes: 29 additions & 79 deletions ci.cake
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,39 @@ var target = Argument("target", "default");
var configuration = Argument("configuration", string.Empty);
var recursive = Argument("recursive", false);

packerTemplates = new List<PackerTemplate>();

// windows-10
var w10e = PackerTemplates_CreateWindows("w10e");
var w10e_dc = PackerTemplates_CreateWindows("w10e-dc", parents: w10e);
var w10e_dc_vs17c = PackerTemplates_CreateWindows("w10e-dc-vs17c", parents: w10e_dc);
var w10e_dc_vs17p = PackerTemplates_CreateWindows("w10e-dc-vs17p", parents: w10e_dc);

packerTemplates = packerTemplates.
Concat(w10e).
Concat(w10e_dc).
Concat(w10e_dc_vs17c).
Concat(w10e_dc_vs17p).
ToList();

var w16s = PackerTemplates_CreateWindows("w16s", amazon: true);
var w16s_dc = PackerTemplates_CreateWindows("w16s-dc", parents: w16s);
var w16s_dc_vs17c = PackerTemplates_CreateWindows("w16s-dc-vs17c", parents: w16s_dc);
var w16s_dc_vs17p = PackerTemplates_CreateWindows("w16s-dc-vs17p", parents: w16s_dc);
var w16s_iis = PackerTemplates_CreateWindows("w16s-iis", parents: w16s);
var w16s_sql14d = PackerTemplates_CreateWindows("w16s-sql14d", parents: w16s);
var w16s_sql17d = PackerTemplates_CreateWindows("w16s-sql17d", parents: w16s);

packerTemplates = packerTemplates.
Concat(w16s).
Concat(w16s_dc).
Concat(w16s_dc_vs17c).
Concat(w16s_dc_vs17p).
Concat(w16s_iis).
Concat(w16s_sql14d).
Concat(w16s_sql17d).
ToList();

var w16sc = PackerTemplates_CreateWindows("w16sc");
var w16sc_de = PackerTemplates_CreateWindows("w16sc-de", parents: w16sc);

packerTemplates = packerTemplates.
Concat(w16sc).
Concat(w16sc_de).
ToList();

var w1809de = PackerTemplates_CreateWindows("w1809de");
// var w1809de_dc = PackerTemplates_CreateWindows("w1809de-dc", parents: w1809de);
// var w1809de_dc_vs17c = PackerTemplates_CreateWindows("w1809de-dc-vs17c", parents: w1809de_dc);
// var w1809de_dc_vs17p = PackerTemplates_CreateWindows("w1809de-dc-vs17p", parents: w1809de_dc);

packerTemplates = packerTemplates.
Concat(w1809de).
// Concat(w1809de_dc).
// Concat(w1809de_dc_vs17c).
// Concat(w1809de_dc_vs17p).
ToList();

var w1809ss = PackerTemplates_CreateWindows("w1809ss");
// var w1809ss_dc = PackerTemplates_CreateWindows("w1809ss-dc", parents: w1809ss);
// var w1809ss_dc_vs17c = PackerTemplates_CreateWindows("w1809ss-dc-vs17c", parents: w1809ss_dc);
// var w1809ss_dc_vs17p = PackerTemplates_CreateWindows("w1809ss-dc-vs17p", parents: w1809ss_dc);

packerTemplates = packerTemplates.
Concat(w1809ss).
// Concat(w1809ss_dc).
// Concat(w1809ss_dc_vs17c).
// Concat(w1809ss_dc_vs17p).
ToList();

var w1809ssc = PackerTemplates_CreateWindows("w1809ssc");
var w1809ssc_de = PackerTemplates_CreateWindows("w1809ssc-de", parents: w1809ssc);

packerTemplates = packerTemplates.
Concat(w1809ssc).
Concat(w1809ssc_de).
ToList();
// windows-server
var ws2019s = PackerTemplates_CreateWindows("ws2019s");
var ws2019sc = PackerTemplates_CreateWindows("ws2019sc");

// ubuntu-desktop
var u16d = PackerTemplates_CreateLinux("u16d");

// ubuntu-server
var u16s = PackerTemplates_CreateLinux("u16s");

// docker windows
var ws2019sc_de = PackerTemplates_CreateWindows("ws2019sc-de", parents: ws2019sc);

// docker-linux
var u16s_dc = PackerTemplates_CreateLinux("u16s-dc", parents: u16s);

packerTemplates = packerTemplates.
Concat(u16s).
Concat(u16s_dc).
ToList();
// iis
var ws2019s_iis = PackerTemplates_CreateWindows("ws2019s-iis", parents: ws2019s);

var u16d = PackerTemplates_CreateLinux("u16d");
var u16d_dc = PackerTemplates_CreateLinux("u16d-dc", parents: u16d);
// sql-server
var ws2019s_sql17d = PackerTemplates_CreateWindows("ws2019s-sql17d", parents: ws2019s);

packerTemplates = packerTemplates.
Concat(u16d).
Concat(u16d_dc).
ToList();
// visual-studio
var w10e_dc = PackerTemplates_CreateWindows("w10e-dc", parents: w10e);
var w10e_dc_vs17c = PackerTemplates_CreateWindows("w10e-dc-vs17c", parents: w10e_dc);
var w10e_dc_vs17p = PackerTemplates_CreateWindows("w10e-dc-vs17p", parents: w10e_dc);

var ws2019s_dc = PackerTemplates_CreateWindows("ws2019s-dc", parents: ws2019s);
var ws2019s_dc_vs17c = PackerTemplates_CreateWindows("ws2019s-dc-vs17c", parents: ws2019s_dc);
var ws2019s_dc_vs17p = PackerTemplates_CreateWindows("ws2019s-dc-vs17p", parents: ws2019s_dc);

packerTemplate = configuration;
packerRecursive = recursive;
Expand Down Expand Up @@ -148,6 +94,8 @@ IEnumerable<PackerTemplate> PackerTemplates_CreateWindows(string name, bool amaz
items.Add(amazonSysprep);
}

packerTemplates.AddRange(items);

return items;
}

Expand Down Expand Up @@ -217,6 +165,8 @@ IEnumerable<PackerTemplate> PackerTemplates_CreateLinux(string name, bool amazon
items.Add(azureSysprep);
}

packerTemplates.AddRange(items);

return items;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/cake/core.cake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#load "./template.cake"

IEnumerable<PackerTemplate> packerTemplates = new PackerTemplate[] {};
var packerTemplates = new List<PackerTemplate>();
var packerTemplate = string.Empty;
var packerRecursive = false;

Expand Down
10 changes: 6 additions & 4 deletions src/dc/packer/provisioners/shell-install/scripts/custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(
apt-get update
apt-get install -y docker-ce

curl -L https://github.com/docker/machine/releases/download/v0.15.0/docker-machine-$(uname -s)-$(uname -m) -o /tmp/docker-machine
curl -L https://github.com/docker/machine/releases/download/v0.16.1/docker-machine-$(uname -s)-$(uname -m) -o /tmp/docker-machine
install /tmp/docker-machine /usr/local/bin/docker-machine
for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash
do
wget "https://raw.githubusercontent.com/docker/machine/v0.15.0/contrib/completion/bash/${i}" -P /etc/bash_completion.d
wget "https://raw.githubusercontent.com/docker/machine/v0.16.1/contrib/completion/bash/${i}" -P /etc/bash_completion.d
done

curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
curl -L https://raw.githubusercontent.com/docker/compose/1.22.0/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
curl -L https://raw.githubusercontent.com/docker/compose/1.23.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

usermod -aG docker vagrant
1 change: 1 addition & 0 deletions src/u/packer/postprocessors/vagrant-virtualbox/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ Vagrant.configure(2) do |config|
config.vm.provider 'virtualbox' do |vb|
vb.memory = 1024
vb.cpus = 1
vb.gui = true
end
end
2 changes: 1 addition & 1 deletion src/u/packer/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"variables": {
"name": "",
"description": "",
"version": "1811.0.0",
"version": "1901.0.0",
"author": "gusztavvargadr",
"output_directory": "output"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
default['gusztavvargadr_packer_vs17c']['default'] = {
'chocolatey_packages' => {
'resharper-ultimate-all' => {
'version' => '2017.3.5',
'jetbrainstoolbox' => {
'install' => {
'params' => '"\'/PerMachine\'"',
},
'elevated' => true,
},
'resharper-clt' => {
'version' => '2017.3.5',
'elevated' => true,
},
},
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
include_recipe 'gusztavvargadr_packer_w::install'
include_recipe 'gusztavvargadr_visualstudio::2017_community'

# gusztavvargadr_windows_chocolatey_packages '' do
# options node['gusztavvargadr_packer_vs17c']['default']['chocolatey_packages']
# end
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# gusztavvargadr_windows_chocolatey_packages '' do
# chocolatey_packages_options node['gusztavvargadr_packer_vs17c']['default']['chocolatey_packages']
# end

include_recipe 'gusztavvargadr_packer_w::patch'
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
default['gusztavvargadr_packer_vs17p']['default'] = {
'chocolatey_packages' => {
'resharper-ultimate-all' => {
'version' => '2017.3.5',
'jetbrainstoolbox' => {
'install' => {
'params' => '"\'/PerMachine\'"',
},
'elevated' => true,
},
'resharper-clt' => {
'version' => '2017.3.5',
'elevated' => true,
},
},
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
include_recipe 'gusztavvargadr_packer_w::install'
include_recipe 'gusztavvargadr_visualstudio::2017_professional'

# gusztavvargadr_windows_chocolatey_packages '' do
# options node['gusztavvargadr_packer_vs17p']['default']['chocolatey_packages']
# end
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# gusztavvargadr_windows_chocolatey_packages '' do
# chocolatey_packages_options node['gusztavvargadr_packer_vs17c']['default']['chocolatey_packages']
# end

include_recipe 'gusztavvargadr_packer_w::patch'
4 changes: 2 additions & 2 deletions src/w/packer/builders/amazon/userdata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Write-Host "Install 7zip"
choco install 7zip.portable -y --version 18.6

Write-Host "Install sdelete"
choco install sdelete -y --version 2.01 --ignorechecksum
choco install sdelete -y --version 2.02

Write-Host "Configure network profiles"
Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private }
Expand All @@ -36,7 +36,7 @@ netsh advfirewall firewall delete rule name="Autounattend WinRM-HTTP"

Write-Host "Install OpenSSH"
netsh advfirewall firewall add rule name="Autounattend SSH" dir=in localport=22 protocol=TCP action=block
choco install openssh -y --version 7.9.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"'
choco install openssh -y --version 7.7.2.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"'
sc.exe config sshd start= auto
net stop sshd
netsh advfirewall firewall delete rule name="Autounattend SSH"
Expand Down
4 changes: 2 additions & 2 deletions src/w/packer/builders/iso/floppy/Autounattend.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Write-Host "Install 7zip"
choco install 7zip.portable -y --version 18.6

Write-Host "Install sdelete"
choco install sdelete -y --version 2.01 --ignorechecksum
choco install sdelete -y --version 2.02

Write-Host "Configure network profiles"
Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private }
Expand All @@ -34,7 +34,7 @@ netsh advfirewall firewall delete rule name="Autounattend WinRM-HTTP"

Write-Host "Install OpenSSH"
netsh advfirewall firewall add rule name="Autounattend SSH" dir=in localport=22 protocol=TCP action=block
choco install openssh -y --version 7.9.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"'
choco install openssh -y --version 7.7.2.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"'
sc.exe config sshd start= auto
net stop sshd
netsh advfirewall firewall delete rule name="Autounattend SSH"
Expand Down
1 change: 1 addition & 0 deletions src/w/packer/postprocessors/vagrant-virtualbox/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Vagrant.configure(2) do |config|
config.vm.provider 'virtualbox' do |vb|
vb.memory = 1024
vb.cpus = 1
vb.gui = true
end

config.vm.network :forwarded_port, guest: 3389, host: 33389, auto_correct: true
Expand Down
2 changes: 1 addition & 1 deletion src/w/packer/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"variables": {
"name": "",
"description": "",
"version": "1811.0.0",
"version": "1901.0.0",
"author": "gusztavvargadr",
"output_directory": "output"
},
Expand Down
Loading

0 comments on commit a099639

Please sign in to comment.