summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorYibo Cai <yibo.cai@arm.com>2017-11-07 13:58:59 +0800
committerYibo Cai <yibo.cai@arm.com>2017-11-07 15:21:53 +0800
commitf2e3d1ed47cea49c1d06fcfce49fb4cb42e8f863 (patch)
treeb746040d7be57a2645a435cafb11a99a9de400f9 /deploy
parent805cbb914fa5927b4b04ea124870c66ecbcba6cc (diff)
cobbler: support aarch64
Set ADAPTER_OS_PATTERN='(?i)CentOS-7.*arm.*' to deploy CentOS aarch64. Change-Id: I943e2edfc03b92446fb393c63c254ab8e3c37225 Signed-off-by: Yibo Cai <yibo.cai@arm.com>
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/cobbler/kickstarts/default-aarch64.ks136
-rw-r--r--deploy/compass_conf/adapter/ansible_kubernetes.conf2
-rwxr-xr-xdeploy/compass_conf/os/centos7.3.aarch64.conf3
-rwxr-xr-xdeploy/compass_conf/os/ubuntu16.04.aarch64.conf3
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/profile.tmpl3
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/system.tmpl76
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/profile.tmpl3
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/system.tmpl75
8 files changed, 300 insertions, 1 deletions
diff --git a/deploy/adapters/cobbler/kickstarts/default-aarch64.ks b/deploy/adapters/cobbler/kickstarts/default-aarch64.ks
new file mode 100644
index 00000000..365694fb
--- /dev/null
+++ b/deploy/adapters/cobbler/kickstarts/default-aarch64.ks
@@ -0,0 +1,136 @@
+# Kickstart for Profile: CentOS7.3_aarch64
+# Distro: CentOS7.3
+
+# System Authorization
+auth --useshadow --enablemd5
+
+#if $os_version == "rhel7"
+eula --agreed
+services --enabled=NetworkManager,sshd
+#end if
+
+# Use Graphic Mode
+text
+
+# Disable Firewall
+firewall --disabled
+
+# Run the Setup Agent on first-boot
+firstboot --disable
+
+# System Keyboard
+keyboard us
+
+# Language Setting
+lang en_US
+
+# Installation Loggin Level
+logging --level=info
+
+# Network Installation
+url --url=$tree
+
+
+$SNIPPET('kickstart_network_config')
+$SNIPPET('kickstart_yum_repo_config')
+
+# Set User Password
+#if $getVar('username', 'root') != "root"
+rootpw root
+ #set username = $getVar('username', 'root')
+ #set crypted_param = ''
+ #set password_param = '--password=%s' % $username
+ #if $getVar('password', '') != ""
+ #set crypted_param = '--iscrypted'
+ #set password_param = '--password=%s' % $password
+ #end if
+user --name=$username $crypted_param $password_param
+#else
+ #if $getVar('password', '') != ""
+rootpw --iscrypted $password
+ #else
+rootpw root
+ #end if
+#end if
+
+# Selinux Disable
+selinux --disabled
+
+# No X Window System
+skipx
+
+# System Timezone
+#if $getVar('timezone', '') != ""
+timezone --utc $timezone
+#else
+timezone --utc US/Pacific
+#end if
+
+ignoredisk --only-use=sda
+bootloader --location=mbr
+clearpart --drives=sda --all --initlabel
+part /boot/efi --fstype=efi --size=200
+part /boot --fstype=ext4 --size=512
+part / --fstype=ext4 --size=10240 --grow
+part swap --size=4000
+
+# Install
+install
+
+# Reboot After Installation
+reboot
+
+%pre
+$SNIPPET('kickstart_pre_log')
+$SNIPPET('kickstart_start')
+$SNIPPET('kickstart_pre_install_network_config')
+
+# Enable installation monitoring
+$SNIPPET('kickstart_pre_anamon')
+%end
+
+# Packages
+%packages --nobase
+@core
+iproute
+# ntp
+openssh-clients
+# wget
+# yum-plugin-priorities
+json-c
+libestr
+rsyslog
+parted
+# vim
+# lsof
+# strace
+# if $os_version == "rhel7"
+# net-tools
+# end if
+#if $getVar('tool', '') != ''
+ #set $kickstart_software = "kickstart_software_%s" % $tool
+$SNIPPET($kickstart_software)
+#end if
+%end
+
+%post --log=/var/log/post_install.log
+$SNIPPET('kickstart_post_log')
+$SNIPPET('kickstart_post_install_kernel_options')
+$SNIPPET('kickstart_post_install_network_config')
+
+chkconfig iptables off
+chkconfig ip6tables off
+
+$SNIPPET('kickstart_yum')
+$SNIPPET('kickstart_ssh')
+# $SNIPPET('kickstart_ntp')
+$SNIPPET('kickstart_limits.conf')
+$SNIPPET('kickstart_sysctl.conf')
+$SNIPPET('kickstart_rsyslog.conf')
+#if $getVar('tool', '') != ''
+ #set $kickstart_tool = "kickstart_%s" % $tool
+$SNIPPET($kickstart_tool)
+#end if
+$SNIPPET('kickstart_post_anamon')
+$SNIPPET('kickstart_done')
+%end
diff --git a/deploy/compass_conf/adapter/ansible_kubernetes.conf b/deploy/compass_conf/adapter/ansible_kubernetes.conf
index 7b8023c2..a3ab671a 100644
--- a/deploy/compass_conf/adapter/ansible_kubernetes.conf
+++ b/deploy/compass_conf/adapter/ansible_kubernetes.conf
@@ -3,5 +3,5 @@ DISPLAY_NAME = 'Kubernetes'
PARENT = 'general'
PACKAGE_INSTALLER = 'ansible_installer_kubernetes'
OS_INSTALLER = 'cobbler'
-SUPPORTED_OS_PATTERNS = ['(?i)ubuntu-16\.04', '(?i)CentOS-7.*16.*']
+SUPPORTED_OS_PATTERNS = ['(?i)ubuntu-16\.04', '(?i)CentOS-7.*16.*', '(?i)CentOS-7.*arm.*']
DEPLOYABLE = True
diff --git a/deploy/compass_conf/os/centos7.3.aarch64.conf b/deploy/compass_conf/os/centos7.3.aarch64.conf
new file mode 100755
index 00000000..bd3bce30
--- /dev/null
+++ b/deploy/compass_conf/os/centos7.3.aarch64.conf
@@ -0,0 +1,3 @@
+NAME = 'CentOS-7-Minimal-1611-arm-arm'
+PARENT = 'CentOS'
+DEPLOYABLE = True
diff --git a/deploy/compass_conf/os/ubuntu16.04.aarch64.conf b/deploy/compass_conf/os/ubuntu16.04.aarch64.conf
new file mode 100755
index 00000000..986c0397
--- /dev/null
+++ b/deploy/compass_conf/os/ubuntu16.04.aarch64.conf
@@ -0,0 +1,3 @@
+NAME = 'ubuntu-16.04-server-arm-arm64-arm'
+PARENT = 'Ubuntu'
+DEPLOYABLE = True
diff --git a/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/profile.tmpl b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/profile.tmpl
new file mode 100755
index 00000000..cfa89004
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/profile.tmpl
@@ -0,0 +1,3 @@
+{
+ "repos": "$getVar('repo_name', '')"
+}
diff --git a/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/system.tmpl b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/system.tmpl
new file mode 100755
index 00000000..8e4cbbbe
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/CentOS-7-Minimal-1611-arm-arm/system.tmpl
@@ -0,0 +1,76 @@
+{
+ "name": "$hostname",
+ "hostname": "$hostname",
+ "profile": "$profile",
+ "gateway": "$gateway",
+ #import simplejson as json
+ #set nameservers = json.dumps($nameservers, encoding='utf-8')
+ "name_servers": $nameservers,
+ #set search_path = ' '.join($search_path)
+ "name_servers_search": "$search_path",
+ "proxy": "$getVar('http_proxy', '')",
+ "modify_interface":
+ #set networks = $networks
+ #set rekeyed = {}
+ #set promic_nic = ""
+ #for $nic, $val in $networks.iteritems():
+ #set ip_key = '-'.join(('ipaddress', $nic))
+ #set netmask_key = '-'.join(('netmask', $nic))
+ #set mgmt_key = '-'.join(('management', $nic))
+ #set static_key = '-'.join(('static', $nic))
+ #set $rekeyed[$ip_key] = $val.ip
+ #set $rekeyed[$netmask_key] = $val.netmask
+ #set $rekeyed[$mgmt_key] = $val.is_mgmt
+ #set $rekeyed[$static_key] = True
+
+ #set dns_key = '-'.join(('dnsname', $nic))
+ #if $val.is_mgmt
+ #set $rekeyed[$dns_key] = $dns
+ #else
+ #if '.' in $dns
+ #set $dns_name, $dns_domain = $dns.split('.', 1)
+ #set $dns_nic = '%s-%s.%s' % ($dns_name, $nic, $dns_domain)
+ #else
+ #set $dns_nic = '%s-%s' % ($dns, $nic)
+ #end if
+ #set $rekeyed[$dns_key] = $dns_nic
+ #end if
+
+ #if $val.is_promiscuous:
+ #set promic_nic = $nic
+ #end if
+ #if $val.is_mgmt:
+ #set mac_key = '-'.join(('macaddress', $nic))
+ #set $rekeyed[$mac_key] = $mac
+ #end if
+ #end for
+ #set nic_info = json.dumps($rekeyed, encoding='utf-8')
+ $nic_info
+ ,
+ "ksmeta":{
+ #set partition_config = ''
+ #for k, v in $partition.iteritems():
+ #set path = ''
+ #if v['vol_percentage']:
+ #set $path = k + ' ' + str(v['vol_percentage']) + '%'
+ #else:
+ #set $path = k + ' ' + str(v['vol_size'])
+ #end if
+ #set partition_config = ';'.join((partition_config, $path))
+ #end for
+ #set partition_config = partition_config[1:]
+ #import crypt
+ #set $password = crypt.crypt($server_credentials.password, "az")
+ #set no_proxy = ','.join($getVar('no_proxy', []))
+ "username": "$server_credentials.username",
+ "password": "$password",
+ "promisc_nics": "$promic_nic",
+ "partition": "$partition_config",
+ "https_proxy": "$getVar('https_proxy', '')",
+ "ntp_server": "$ntp_server",
+ "timezone": "$timezone",
+ "ignore_proxy": "$no_proxy",
+ "local_repo": "$getVar('local_repo', '')",
+ "disk_num": "1"
+ }
+}
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/profile.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/profile.tmpl
new file mode 100755
index 00000000..cfa89004
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/profile.tmpl
@@ -0,0 +1,3 @@
+{
+ "repos": "$getVar('repo_name', '')"
+}
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/system.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/system.tmpl
new file mode 100755
index 00000000..cfcc883e
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04-server-arm-arm64-arm/system.tmpl
@@ -0,0 +1,75 @@
+{
+ "name": "$hostname",
+ "hostname": "$hostname",
+ "profile": "$profile",
+ "gateway": "$gateway",
+ #import simplejson as json
+ #set nameservers = json.dumps($nameservers, encoding='utf-8')
+ "name_servers": $nameservers,
+ #set search_path = ' '.join($search_path)
+ "name_servers_search": "$search_path",
+ "proxy": "$getVar('http_proxy', '')",
+ "modify_interface":
+ #set networks = $networks
+ #set rekeyed = {}
+ #set promic_nic = ""
+ #for $nic, $val in $networks.iteritems():
+ #set ip_key = '-'.join(('ipaddress', $nic))
+ #set netmask_key = '-'.join(('netmask', $nic))
+ #set mgmt_key = '-'.join(('management', $nic))
+ #set static_key = '-'.join(('static', $nic))
+ #set $rekeyed[$ip_key] = $val.ip
+ #set $rekeyed[$netmask_key] = $val.netmask
+ #set $rekeyed[$static_key] = True
+
+ #set dns_key = '-'.join(('dnsname', $nic))
+ #if $val.is_mgmt
+ #set $rekeyed[$dns_key] = $dns
+ #else
+ #if '.' in $dns
+ #set $dns_name, $dns_domain = $dns.split('.', 1)
+ #set $dns_nic = '%s-%s.%s' % ($dns_name, $nic, $dns_domain)
+ #else
+ #set $dns_nic = '%s-%s' % ($dns, $nic)
+ #end if
+ #set $rekeyed[$dns_key] = $dns_nic
+ #end if
+
+ #if $val.is_promiscuous:
+ #set promic_nic = $nic
+ #end if
+ #if $val.is_mgmt:
+ #set mac_key = '-'.join(('macaddress', $nic))
+ #set $rekeyed[$mac_key] = $mac
+ #end if
+ #end for
+ #set nic_info = json.dumps($rekeyed, encoding='utf-8')
+ $nic_info
+ ,
+ "ksmeta":{
+ #set partition_config = ''
+ #for k, v in $partition.iteritems():
+ #set path = ''
+ #if v['vol_percentage']:
+ #set $path = k + ' ' + str(v['vol_percentage']) + '%'
+ #else:
+ #set $path = k + ' ' + str(v['vol_size'])
+ #end if
+ #set partition_config = ';'.join((partition_config, $path))
+ #end for
+ #set partition_config = partition_config[1:]
+ #import crypt
+ #set $password = crypt.crypt($server_credentials.password, "az")
+ #set no_proxy = ','.join($getVar('no_proxy', []))
+ "username": "$server_credentials.username",
+ "password": "$password",
+ "promisc_nics": "$promic_nic",
+ "partition": "$partition_config",
+ "https_proxy": "$getVar('https_proxy', '')",
+ "ntp_server": "$ntp_server",
+ "timezone": "$timezone",
+ "ignore_proxy": "$no_proxy",
+ "local_repo": "$getVar('local_repo', '')",
+ "disk_num": "1"
+ }
+}