Commit 23fa46d3 authored by Thomas Lavocat's avatar Thomas Lavocat
Browse files

Take into account the new g5k version for debian9

parent 987e9931
......@@ -122,9 +122,9 @@ def get_boot_information(disk):
"""Looking for boot information"""
script_1 = """
blkid /dev/sda1 | grep ^UUID: | awk '{print $2}'
ls /boot/ | grep ^vmlinuz | head -n 1
ls /boot/ | grep ^init | grep -v fallback | head -n 1
ls /boot/ | grep ^init | grep fallback | head -n 1"""
ls /boot/ | grep ^vmlinuz | sort -rn | head -n 1
ls /boot/ | grep ^init | grep -v fallback | sort -rn | head -n 1
ls /boot/ | grep ^init | grep fallback | sort -rn | head -n 1"""
logger.info(get_boot_information.__doc__)
output_1 = run_guestfish_script(disk, script_1, piped_output=True)
try:
......
......@@ -15,12 +15,13 @@ global:
release_number: -debian9
bootstrap_image_version: "latest"
os_release: debian9
image_version: 2017122808
image_version: 2018022018
variant: min
rootfs_archive_url: http://kameleon.imag.fr/builds/$${distrib}$${release_number}_$${bootstrap_image_version}.tar.xz
output: "$${kameleon_cwd}/$${kameleon_recipe_name}" # output files basename
g5k_tgz_path: server:///path/to/your/image
g5k_postinst_path: server:///grid5000/postinstalls/debian-x64-min-1.2-post.tgz
g5k_postinst_path: server:///grid5000/postinstalls/g5k-postinstall.tgz
g5k_postinst_script: g5k-postinstall --net debian,traditional-names
g5k_kernel_params: "net.ifnames=0 biosdevname=0 modprobe.blacklist=myri10ge" # Predictable interface name not supported yet
force_puppet_debian_version: jessie #Because puppet stretch is not released yet
......
......@@ -9,8 +9,7 @@
extend: debian9-x64-common.yaml # Cf 'jessie-x64-common' for a real content. This recipe only overwrite variant.
global:
variant: nfs
g5k_postinst_path: server:///grid5000/postinstalls/debian-x64-nfs-2.6-post.tgz
g5k_postinst_script: g5k-postinstall --net debian,traditional-names --fstab nfs
bootstrap:
- "@base"
......
......@@ -35,6 +35,7 @@ global:
output: "$${kameleon_cwd}/$${kameleon_recipe_name}" # output files basename
g5k_tgz_path: server:///path/to/your/image
g5k_postinst_path: server:///grid5000/postinstalls/debian-x64-min-1.2-post.tgz
g5k_postinst_script: traitement.ash /rambin
g5k_kernel_params: ""
kernel_args: "net.ifnames=0 biosdevname=0 console=ttyS0"
arg_create: --basefolder /tmp
......@@ -61,4 +62,5 @@ setup:
export:
- disable_checkpoint
- "@base"
- cloud_init_qcow2
- export_g5k
......@@ -162,7 +162,7 @@ end
# For the different states, see:
# https://github.com/grid5000/g5k-api/lib/oar/resource.rb
def user_deploy?(hostname)
url = G5K_API + '/sites/' + site(hostname) + '/clusters/' + cluster(hostname) + '/status'
url = G5K_API + '/sites/' + site(hostname) + '/status?disks=no&job_details=no&waiting=no&network_address=' + hostname
hash = JSON::parse(open(url).read)
status = hash['nodes'][hostname]['soft']
debug("Node status: #{status}")
......
......@@ -33,6 +33,23 @@ class env::big::configure_kvm () {
group => root,
mode => '0755',
source => 'puppet:///modules/env/big/kvm/create_tap';
'/usr/lib/qemu/qemu-bridge-helper':
ensure => present,
owner => root,
group => root,
mode => '4755';
'/etc/qemu':
ensure => directory,
owner => root,
group => root,
mode => '0755';
'/etc/qemu/bridge.conf':
ensure => file,
owner => root,
group => root,
mode => '0644',
content => "allow br0",
require => File['/etc/qemu'];
'/usr/local/bin/random_mac':
ensure => present,
owner => root,
......
......@@ -34,14 +34,6 @@ class env::big::configure_nvidia_gpu::cuda () {
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/libcuda.so',
require => Exec['install_nvidia_cuda'],
notify => Exec['update_ld_conf'];
'/etc/ld.so.conf.d/cuda.conf':
ensure => file,
owner => root,
group => root,
mode => '0644',
source => 'puppet:///modules/env/big/nvidia/cuda-9.0.conf',
notify => Exec['update_ld_conf'];
}
} else {
file{
......
......@@ -3,7 +3,7 @@ class env::big::configure_nvidia_gpu::drivers () {
### This class exists for gpuclus cluster, that require a recent version of nvidia driver (346.22)
# May be changed to a link inside g5k if required
$driver_source = 'https://www.grid5000.fr/packages/debian/NVIDIA-Linux-x86_64-384.66.run'
$driver_source = 'https://www.grid5000.fr/packages/debian/NVIDIA-Linux-x86_64-390.25.run'
package {
['module-assistant', 'dkms']:
......
......@@ -29,18 +29,18 @@ class env::std::dell {
'src' => false
}
}
package {
['srvadmin-all', 'dtk-scripts']:
ensure => 'installed',
require => [Apt::Source['linux.dell.com'], Exec['apt_update']]
}
service { 'dataeng':
enable => 'true',
require => Package['srvadmin-all', 'dtk-scripts']
}
# Fix bug 7324
file { '/etc/omreg.cfg':
ensure => 'link',
......@@ -97,7 +97,7 @@ class env::std::dell {
enable => 'true',
require => Package['srvadmin-base']
}
# Fix bug 7324
file { '/etc/omreg.cfg':
ensure => 'link',
......@@ -105,14 +105,14 @@ class env::std::dell {
require => Package['srvadmin-base']
}
# Fix bug 8048
# Fix bug 8048 and 8975
file {
'/etc/systemd/system/dataeng.service.d':
ensure => 'directory',
require => Package['srvadmin-base'];
'/etc/systemd/system/dataeng.service.d/stop.conf':
ensure => 'file',
content => "[Service]\nExecStop=\n",
content => "[Service]\nExecStop=\nKillMode=control-group\nKillSignal=9",
require => Package['srvadmin-base'];
}
}
......
......@@ -11,7 +11,7 @@ class env::std::install_g5kchecks {
if "${::lsbdistcodename}" == "stretch" {
$g5kchecks_deps = [ 'ruby-rest-client', 'ohai', 'fio', 'ruby-json', 'x86info', 'ethtool' ]
$g5kchecks_dist = "_stretch"
$g5kchecks_version = "0.7.17"
$g5kchecks_version = "0.7.18"
}
case $operatingsystem {
'Debian','Ubuntu': {
......
# Install cloud_init only in qcow2 output file
- install_cloud_init:
- exec_local: |
echo "Install cloud_init in qcow2"
virt-customize -a $${output}.qcow2 --install cloud-init
echo "Configure datasource and timeout for cloud_init"
virt-customize -a $${output}.qcow2 --run-command 'echo "datasource_list: [ NoCloud, Ec2, None ]" > /etc/cloud/cloud.cfg.d/91-set-datasources.cfg'
virt-customize -a $${output}.qcow2 --run-command 'echo "datasource:\n Ec2:\n timeout: 3\n max_wait: 5" > /etc/cloud/cloud.cfg.d/92-set-ec2-timeout.cfg'
......@@ -33,7 +33,7 @@
postinstalls:
- archive: $${g5k_postinst_path}
compression: gzip
script: traitement.ash /rambin
script: $${g5k_postinst_script}
boot:
kernel_params: "$${g5k_kernel_params}"
kernel: /vmlinuz
......@@ -59,7 +59,7 @@
postinstalls:
- archive: $${g5k_postinst_path}
compression: gzip
script: traitement.ash /rambin
script: $${g5k_postinst_script}
boot:
kernel: /vmlinuz
initrd: /initrd.img
......
......@@ -26,6 +26,7 @@
- set_release:
- exec_in: echo "$${os_release}-x64-$${variant}-$${image_version}" >> $${puppet_build_path}/$${release_file}
- exec_in: echo "$${g5k_postinst_path}" >> $${puppet_build_path}/$${release_file}
- exec_in: echo "$${g5k_postinst_script}" >> $${puppet_build_path}/$${release_file}
# this extracts last git commit hash from local repo
- pipe:
- exec_local: |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment