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
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Commits
a7f593fd
Commit
a7f593fd
authored
Oct 19, 2021
by
Francois Le Corre
Committed by
Thomas Gambier
Oct 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CentOS 8
parent
22ed3eb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
7 deletions
+114
-7
packer/build-vm-bootstrap.yml
packer/build-vm-bootstrap.yml
+7
-7
packer/centos-8.json
packer/centos-8.json
+57
-0
packer/http/centos8.cfg
packer/http/centos8.cfg
+50
-0
No files found.
packer/build-vm-bootstrap.yml
View file @
a7f593fd
...
...
@@ -56,13 +56,13 @@
-
{
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-8.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 }}' centos-8.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 }}' centos-7.json >> log/centos7-{{ item.name }}.log
args
:
...
...
packer/centos-8.json
0 → 100644
View file @
a7f593fd
{
"variables"
:
{
"user"
:
"slapos"
,
"password"
:
"slapos"
,
"domain"
:
""
,
"disk_size"
:
"100"
,
"name"
:
"image"
,
"custom_script"
:
"scripts/empty.sh"
},
"builders"
:
[
{
"name"
:
"centos8-{{ user `disk_size`}}G-{{ user `name`}}"
,
"type"
:
"qemu"
,
"format"
:
"qcow2"
,
"accelerator"
:
"kvm"
,
"disk_size"
:
"{{ user `disk_size`}}000"
,
"iso_url"
:
"http://mirrors.ircam.fr/pub/CentOS/8.1.1911/isos/x86_64/CentOS-8.1.1911-x86_64-dvd1.iso"
,
"iso_checksum"
:
"3ee3f4ea1538e026fff763e2b284a6f20b259d91d1ad5688f5783a67d279423b"
,
"iso_checksum_type"
:
"sha256"
,
"http_directory"
:
"http"
,
"ssh_username"
:
"{{user `user`}}"
,
"ssh_password"
:
"{{user `password`}}"
,
"ssh_wait_timeout"
:
"1800s"
,
"shutdown_command"
:
"sudo poweroff"
,
"headless"
:
true
,
"boot_wait"
:
"2s"
,
"boot_command"
:
[
"<tab>"
,
"linux ks=http://{{.HTTPIP}}:{{.HTTPPort}}/centos7-anaconda-ks.cfg biosdevname=0 net.ifnames=0"
,
"<enter>"
,
"<wait>"
]
}
],
"provisioners"
:
[
{
"type"
:
"shell"
,
"execute_command"
:
"echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'"
,
"scripts"
:
[
"scripts/update-centos.sh"
,
"scripts/packages-centos.sh"
,
"scripts/cleanup-centos.sh"
,
"scripts/centos7-install-base.sh"
,
"{{ user `custom_script` }}"
]
}
]
}
packer/http/centos8.cfg
0 → 100644
View file @
a7f593fd
install
text
reboot
url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
lang en_US.UTF-8
keyboard fr
timezone --utc Etc/UTC
rootpw --plaintext slapos
user --name=slapos --groups=slapos --password=slapos --plaintext
zerombr
clearpart --all --initlabel
autopart --type=plain
bootloader --timeout=1
%packages
@core
which
# mandatory packages in the @core group
-btrfs-progs
-iprutils
-kexec-tools
-plymouth
# default packages in the @core group
-*-firmware
-dracut-config-rescue
-kernel-tools
-libsysfs
-microcode_ctl
-NetworkManager*
-postfix
-rdma
%end
%post --erroronfail
yum -y update
cat <<EOF > /etc/sudoers.d/slapos
Defaults:slapos !requiretty
slapos ALL=(ALL) NOPASSWD: ALL
EOF
chmod 440 /etc/sudoers.d/slapos
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
EOF
%end
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