Skip to content

Commit

Permalink
Homework dmitry-lyutenko#1: Create Vagrant box(4)
Browse files Browse the repository at this point in the history
  • Loading branch information
incertov committed May 7, 2020
1 parent 335075a commit a3d7b5b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Describe VMs
MACHINES = {
# VM name "kernel update"
:"kernel update" => {
:"kernel-update" => {
# VM box
:box_name => "incertov/centos-7-5",
# VM CPU count
Expand Down
10 changes: 5 additions & 5 deletions packer/centos.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"variables": {
"artifact_description": "CentOS 7.7 with kernel 5.x",
"artifact_version": "7.7.1908",
"image_name": "centos-7.7"
"artifact_description": "CentOS 7.8 with kernel 5.x",
"artifact_version": "7.8.2003",
"image_name": "centos-7.8"
},

"builders": [
Expand All @@ -16,8 +16,8 @@
"guest_os_type": "RedHat_64",
"http_directory": "http",

"iso_url": "http://mirror.yandex.ru/centos/7.7.1908/isos/x86_64/CentOS-7-x86_64-Minimal-1908.iso",
"iso_checksum": "9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d",
"iso_url": "https://mirror.yandex.ru/centos/7.8.2003/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso",
"iso_checksum": "659691c28a0e672558b003d223f83938f254b39875ee7559d1a4a14c79173193",
"iso_checksum_type": "sha256",

"boot_command": [
Expand Down
2 changes: 1 addition & 1 deletion packer/scripts/stage-1-kernel-update.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Install elrepo
yum install -y http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
yum install -y http://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
# Install new kernel
yum --enablerepo elrepo-kernel install kernel-ml -y
# Remove older kernels (Only for demo! Not Production!)
Expand Down
2 changes: 1 addition & 1 deletion packer/scripts/stage-2-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ rm -rf /run/log/journal/*
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY
sync
grub2-set-default 1
grub2-set-default 0
echo "### Hi from secone stage" >> /boot/grub2/grub.cfg

0 comments on commit a3d7b5b

Please sign in to comment.