Skip to content

IBM-CAMHub-Open/cookbook_ibm_utils_linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Linux Cookbook

Description

The linux cookbook contains features to support the installation and management of linux virtual machines.

Operating System Versions Supported

  • Redhat Enterprise Linux 7.x
  • Redhat Enterprise Linux 6.x

Use Cases

  • Inject host entries into the linux hostfile, based on the nodes deployed.
  • Add customer redhat repositories into a deployed image.
  • Enable additonal redhat repositories on Amazon AMI's to allow successful deployment of Automation Conent

Platform Pre-Requisites

  • None

Software Repository

  • None

Customer Repository Example (role contents)

The following is a sample for adding a cusomter repository.

"linux": {
  "configure":{
    "yum_repositories": "true"
  },
  "yum_repositories": {
    "repo01": { "description": "Repository Description",
                  "repositoryid": "Name of the Repository",
                  "baseurl": "http://x.x.x.x./redhat/6/",
                  "enabled": true,
                  "gpgkey": "",
                  "gpgcheck": true,
                  "sslverify": true,
                  "sslcacert": ""
                }
  }
}

Requirements

Platform:

  • Redhat

Cookbooks:

  • ibm_cloud_utils

Attributes

Attribute Description Default
node['linux']['filesystems']['filesystem($INDEX)']['device'] Device to mount to, leave blank if unknown, the system will search for it. /dev/xvdc
node['linux']['filesystems']['filesystem($INDEX)']['force'] Force the mount true or false true
node['linux']['filesystems']['filesystem($INDEX)']['fstype'] File System Type ext4
node['linux']['filesystems']['filesystem($INDEX)']['group'] Group owner of the mount point default
node['linux']['filesystems']['filesystem($INDEX)']['label'] Label of the file system filesystem1
node['linux']['filesystems']['filesystem($INDEX)']['mountpoint'] Directory to mount to, directory will be created /var/filesystem1
node['linux']['filesystems']['filesystem($INDEX)']['options'] Advanced options for mounting the disk defaults
node['linux']['filesystems']['filesystem($INDEX)']['perms'] Permissions for the mount point. default
node['linux']['filesystems']['filesystem($INDEX)']['size'] Size in GB of the disk true
node['linux']['filesystems']['filesystem($INDEX)']['user'] Owner of the mount point. default
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['device'] Name of the physical device, eg, /dev/xdba. Leave assign a free device based on size
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['logicalvolumes']['logicalvolume($INDEX)']['filesystem'] The stsandard filesystem type. ext4
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['logicalvolumes']['logicalvolume($INDEX)']['lv_name'] Name of the logical volume. lv_name
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['logicalvolumes']['logicalvolume($INDEX)']['lv_size'] Size of the filesystem, use standard lvm file size format 10g
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['logicalvolumes']['logicalvolume($INDEX)']['mountpoint'] Mount Point of the file system attached to the Logical Volume /var/filesystem1
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['logicalvolumes']['logicalvolume($INDEX)']['options'] Name of the logical volume. rw
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['size'] Size if GB of the device. 10
node['linux']['physicalvolumes']['physicalvolume($INDEX)']['vg_name'] Name of the Volume Group to be assigned to the Physical Volume. vgname
node['linux']['yum_repositories']['repo01']['baseurl'] URL For accessing YUM Repository https://xx
node['linux']['yum_repositories']['repo01']['description'] Description of the YUM respository Yum Repository 1
node['linux']['yum_repositories']['repo01']['enabled'] Enable True/False Flag true
node['linux']['yum_repositories']['repo01']['gpgcheck'] GPGCheck True/False Flag true
node['linux']['yum_repositories']['repo01']['gpgkey'] Location of GPG Key
node['linux']['yum_repositories']['repo01']['repositoryid'] Repository ID Name CAM Repository
node['linux']['yum_repositories']['repo01']['sslcacert'] Location of sslcacert
node['linux']['yum_repositories']['repo01']['sslverify'] sslverify True/False Flag true

Recipes

linux::cleanup.rb

Left Empty on purpose, not used in cookbook.

linux::create_fs.rb

Create 1..n disks and mount based on the ibm_cloud_fs resource

linux::create_lvm.rb

Create a series of physical volumes, volume groups and logical volumes

linux::default.rb

Executes the linux-utils role.

linux::gather_evidence.rb

Left Empty on purpose, not used in cookbook.

linux::install.rb

Left Empty on purpose, not used in cookbook.

linux::prereq.rb

Install prequisite packages on Linux distro

linux::test_kitchen_fix.rb

Install net-tools for inspec testing of port numbers.

linux::yumrepo.rb

Create xxx.repo files on a redhat server

License and Author

Author:: IBM Corp (<>)

Copyright:: 2018, IBM Corp

License:: Copyright IBM Corp. 2012, 2018