Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.package
Commits
c7183d54
Commit
c7183d54
authored
Jul 23, 2020
by
Francois Le Corre
Committed by
Thomas Gambier
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ubuntu 20.04 and ansible file cleanup
parent
0c62baab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
121 deletions
+126
-121
packer/build-vm-bootstrap.yml
packer/build-vm-bootstrap.yml
+43
-121
packer/http/preseed-ubuntu20.04.cfg
packer/http/preseed-ubuntu20.04.cfg
+13
-0
packer/ubuntu-20.04-server-amd64.json
packer/ubuntu-20.04-server-amd64.json
+70
-0
No files found.
packer/build-vm-bootstrap.yml
View file @
c7183d54
...
@@ -13,22 +13,6 @@
...
@@ -13,22 +13,6 @@
-
easy_install
:
-
easy_install
:
name
:
slapos.libnetworkcache
name
:
slapos.libnetworkcache
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian7.json >> log/debian7-{{ item.name }}.log
args
:
creates
:
output-debian7-{{ item.size }}G-{{ item.name }}
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian8.json >> log/debian8-{{ item.name }}.log
args
:
creates
:
output-debian8-{{ item.size }}G-{{ item.name }}
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian9.json >> log/debian9-{{ item.name }}.log
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' debian9.json >> log/debian9-{{ item.name }}.log
args
:
args
:
creates
:
output-debian9-{{ item.size }}G-{{ item.name }}
creates
:
output-debian9-{{ item.size }}G-{{ item.name }}
...
@@ -37,41 +21,44 @@
...
@@ -37,41 +21,44 @@
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}'
ubuntu-14.04-server-amd64.json >> log/ubuntu-14-server-amd64
-{{ item.name }}.log
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}'
debian10.json >> log/debian10
-{{ item.name }}.log
args
:
args
:
creates
:
output-
ubuntu-14-server
-{{ item.size }}G-{{ item.name }}
creates
:
output-
debian10
-{{ item.size }}G-{{ item.name }}
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-16.04-server-amd64.json >> log/ubuntu-16.04-server-amd64-{{ item.name }}.log
args
:
creates
:
output-ubuntu-16.04-server-{{ item.size }}G-{{ item.name }}
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-1
6.10-server-amd64.json >> log/ubuntu-16
-server-amd64-{{ item.name }}.log
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-1
8.04-server-amd64.json >> log/ubuntu-18.04
-server-amd64-{{ item.name }}.log
args
:
args
:
creates
:
output-ubuntu-1
6
-server-{{ item.size }}G-{{ item.name }}
creates
:
output-ubuntu-1
8.04
-server-{{ item.size }}G-{{ item.name }}
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-6.7.json >> log/centos-6-{{ item.name }}.log
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' ubuntu-20.04-server-amd64.json >> log/ubuntu-20.04-server-amd64-{{ item.name }}.log
args
:
args
:
creates
:
output-
centos-6
-{{ item.size }}G-{{ item.name }}
creates
:
output-
ubuntu-20.04-server
-{{ item.size }}G-{{ item.name }}
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos-7.2.json >> log/centos-7.2-{{ item.name }}.log
# - shell: PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos8.json >> log/centos8-{{ item.name }}.log
# args:
# creates: output-centos8-{{ item.size }}G-{{ item.name }}
# with_items:
# - { name: "vm-bootstrap", size: "200", script: "scripts/vm-bootstrap.sh"}
# - { name: "vm-bootstrap", size: "50", script: "scripts/vm-bootstrap.sh"}
# - { name: "vm-bootstrap", size: "25", script: "scripts/vm-bootstrap.sh"}
-
shell
:
PATH=$PATH:/opt/packer/ packer build -var 'disk_size={{ item.size }}' -var 'name={{ item.name }}' -var 'custom_script={{ item.script }}' centos7.json >> log/centos7-{{ item.name }}.log
args
:
args
:
creates
:
output-centos7
.2
-{{ item.size }}G-{{ item.name }}
creates
:
output-centos7-{{ item.size }}G-{{ item.name }}
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
script
:
"
scripts/vm-bootstrap.sh"
}
...
@@ -80,23 +67,6 @@
...
@@ -80,23 +67,6 @@
#### Genetation of images are over.
#### Genetation of images are over.
#### Start compress everything
#### Start compress everything
-
shell
:
gzip output-debian7-{{ item.size }}G-{{ item.name }}/packer-debian7-{{ item.size }}G-{{ item.name }}
args
:
creates
:
output-debian7-{{ item.size }}G-{{ item.name }}/packer-debian7-{{ item.size }}G-{{ item.name }}.gz
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
-
shell
:
gzip output-debian8-{{ item.size }}G-{{ item.name }}/packer-debian8-{{ item.size }}G-{{ item.name }}
args
:
creates
:
output-debian8-{{ item.size }}G-{{ item.name }}/packer-debian8-{{ item.size }}G-{{ item.name }}.gz
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
-
shell
:
gzip output-debian9-{{ item.size }}G-{{ item.name }}/packer-debian9-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-debian9-{{ item.size }}G-{{ item.name }}/packer-debian9-{{ item.size }}G-{{ item.name }}
args
:
args
:
...
@@ -107,45 +77,45 @@
...
@@ -107,45 +77,45 @@
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
ignore_errors
:
True
-
shell
:
gzip output-
ubuntu-14-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-14-server
-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-
debian10-{{ item.size }}G-{{ item.name }}/packer-debian10
-{{ item.size }}G-{{ item.name }}
args
:
args
:
creates
:
output-
ubuntu-14-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-14-server-{{ item.size }}G-{{ item.name }}.gz
creates
:
output-
debian10-{{ item.size }}G-{{ item.name }}/packer-debian10-{{ item.size }}G-{{ item.name }}.gz
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
ignore_errors
:
True
-
shell
:
gzip output-ubuntu-1
6.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-16
.04-server-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-ubuntu-1
8.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18
.04-server-{{ item.size }}G-{{ item.name }}
args
:
args
:
creates
:
output-ubuntu-1
6.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-16
.04-server-{{ item.size }}G-{{ item.name }}.gz
creates
:
output-ubuntu-1
8.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-18
.04-server-{{ item.size }}G-{{ item.name }}.gz
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
ignore_errors
:
True
-
shell
:
gzip output-ubuntu-
16-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-16
-server-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-ubuntu-
20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04
-server-{{ item.size }}G-{{ item.name }}
args
:
args
:
creates
:
output-ubuntu-
16-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-16-server-{{ item.size }}G-{{ item.name }}.gz
creates
:
output-ubuntu-
20.04-server-{{ item.size }}G-{{ item.name }}/packer-ubuntu-20.04-server-{{ item.size }}G-{{ item.name }}.gz
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
ignore_errors
:
True
-
shell
:
gzip output-centos
-6-{{ item.size }}G-{{ item.name }}/packer-centos-6
-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-centos
8-{{ item.size }}G-{{ item.name }}/packer-centos8
-{{ item.size }}G-{{ item.name }}
args
:
args
:
creates
:
output-centos
-6-{{ item.size }}G-{{ item.name }}/packer-centos-6-{{ item.size }}G-{{ item.name }}.gz
creates
:
output-centos
8-{{ item.size }}G-{{ item.name }}/packer-centos8-{{ item.size }}G-{{ item.name }}.gz
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
}
ignore_errors
:
True
ignore_errors
:
True
-
shell
:
gzip output-centos7
.2-{{ item.size }}G-{{ item.name }}/packer-centos7.2
-{{ item.size }}G-{{ item.name }}
-
shell
:
gzip output-centos7
-{{ item.size }}G-{{ item.name }}/packer-centos7
-{{ item.size }}G-{{ item.name }}
args
:
args
:
creates
:
output-centos7
.2-{{ item.size }}G-{{ item.name }}/packer-centos7.2-{{ item.size }}G-{{ item.name }}.gz
creates
:
output-centos7
-{{ item.size }}G-{{ item.name }}/packer-centos7-{{ item.size }}G-{{ item.name }}.gz
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
}
...
@@ -162,70 +132,22 @@
...
@@ -162,70 +132,22 @@
sha512sum $FILE >> SHA512SUM.txt
sha512sum $FILE >> SHA512SUM.txt
md5sum $FILE >> MD5SUM.txt
md5sum $FILE >> MD5SUM.txt
with_items
:
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-16-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-16-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-16-server"
}
#### End of build SHA512SUM.txt
-
stat
:
path=/etc/opt/shacache/shacache.cfg
register
:
shacache_config
-
name
:
Upload a list of images to shacache, there is no verification for now
shell
:
|
FILE=output-{{ item.distro }}-{{ item.size }}G-{{ item.name }}/packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz
networkcache-upload --prefix-key packerimage- --url $FILE --file $FILE /etc/opt/shacache/shacache.cfg
SHA512SUM=$(cat SHA512SUM.txt | grep packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz | cut -d ' ' -f1)
BASE_URL=$(cat /etc/opt/shacache/shacache.cfg | grep 'download-cache-url' | cut -d' ' -f3)
MD5SUM=$(cat MD5SUM.txt | grep packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz | cut -d ' ' -f1)
echo "packer-{{ item.distro }}-{{ item.size }}G-{{ item.name }}.gz $BASE_URL/$SHA512SUM $MD5SUM" >> URL.txt
with_items
:
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian9"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos7.2"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
debian10"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos-6"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos7"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
centos8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
centos8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-14-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
centos8"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-18.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-18.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-16.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-18.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-16-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
200"
,
distro
:
"
ubuntu-20.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-16-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
50"
,
distro
:
"
ubuntu-20.04-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-16-server"
}
-
{
name
:
"
vm-bootstrap"
,
size
:
"
25"
,
distro
:
"
ubuntu-20.04-server"
}
when
:
shacache_config.stat.exists == True and upload_shacache == "yes"
packer/http/preseed-ubuntu20.04.cfg
0 → 100644
View file @
c7183d54
d-i preseed/include string ../preseed-ubuntu.cfg
d-i preseed/early_command string \
mkdir -p /usr/lib/post-base-installer.d && \
echo "sed -i -e 's/^in-target.*tasksel.*/#\\0/' /var/lib/dpkg/info/pkgsel.postinst" > /usr/lib/post-base-installer.d/90skip-tasksel && \
chmod +x /usr/lib/post-base-installer.d/90skip-tasksel
d-i preseed/late_command string \
echo 'Defaults:slapos !requiretty' > /target/etc/sudoers.d/slapos; \
echo 'slapos ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/slapos; \
chmod 440 /target/etc/sudoers.d/slapos ; \
ln -sf /dev/null /target/etc/systemd/network/99-default.link; \
in-target update-initramfs -u
packer/ubuntu-20.04-server-amd64.json
0 → 100644
View file @
c7183d54
{
"variables"
:
{
"user"
:
"slapos"
,
"password"
:
"slapos"
,
"domain"
:
""
,
"disk_size"
:
"20"
,
"name"
:
"image"
,
"custom_script"
:
"scripts/empty.sh"
},
"builders"
:
[
{
"name"
:
"ubuntu-20.04-server-{{ user `disk_size`}}G-{{ user `name`}}"
,
"type"
:
"qemu"
,
"format"
:
"qcow2"
,
"accelerator"
:
"kvm"
,
"disk_size"
:
"{{ user `disk_size`}}000"
,
"headless"
:
true
,
"iso_checksum"
:
"9d2b54506f8f9fdad6b72e45aff0f0de"
,
"iso_url"
:
"http://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04-legacy-server-amd64.iso"
,
"iso_checksum_type"
:
"md5"
,
"http_directory"
:
"http"
,
"ssh_username"
:
"{{user `user`}}"
,
"ssh_password"
:
"{{user `password`}}"
,
"ssh_wait_timeout"
:
"1800s"
,
"shutdown_command"
:
"echo '{{user `password`}}'|sudo -S shutdown -P now"
,
"boot_wait"
:
"2s"
,
"boot_command"
:
[
"<esc><wait>"
,
"<esc><wait>"
,
"<enter><wait>"
,
"/install/vmlinuz "
,
"initrd=/install/initrd.gz "
,
"auto=true "
,
"debconf/priority=critical "
,
"keyboard-configuration/modelcode=pc105 keyboard-configuration/layout=FR "
,
"keyboard-configuration/variant=FR console-setup/ask_detect=false "
,
"net.ifnames=0 "
,
"hostname={{ .Name }} "
,
"passwd/user-fullname={{user `user`}} "
,
"passwd/user-password-again={{user `password`}} "
,
"passwd/user-password={{user `password`}} "
,
"passwd/username={{user `user`}} "
,
"noapic "
,
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-ubuntu20.04.cfg "
,
"-- <enter>"
]
}
],
"provisioners"
:
[
{
"type"
:
"shell"
,
"execute_command"
:
"echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
,
"scripts"
:
[
"scripts/update-ubuntu.sh"
,
"scripts/grub-ubuntu.sh"
,
"{{ user `custom_script` }}"
]
}
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment