aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-11-01 11:46:18 +0800
committerYifei Xue <xueyifei@huawei.com>2017-11-28 21:39:19 +0800
commit10361fd56fac5f7aebba44402bf9a501854d00c3 (patch)
tree205b76c0831e272e71dbef64c3c10ea332f13eea /deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64
parent9a76ddb1075479c891389a0c9303d80ead9895a0 (diff)
Upgrade OpenStack version from Ocata to Pike
JIRA: COMPASS-565 For OPNFV F release, it's going to use OpenStack Pike as the NFVI component. This task is created to monitor the upgrade work of OpenStack Pike. Subtasks as follow: - Add Pike related configurations to compass_conf - Upgrade ubuntu os to ubuntu 16.04.3 - Upgrade centos os to centos 7.4 - Upgrade openstack-ansible from ocata to pike - Upgrade openstack repos from ocata to pike Change-Id: I2202e8e3ae23dae8e575c89170c9e5e057757870 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64')
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl3
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl75
2 files changed, 78 insertions, 0 deletions
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl
new file mode 100755
index 00000000..cfa89004
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/profile.tmpl
@@ -0,0 +1,3 @@
+{
+ "repos": "$getVar('repo_name', '')"
+}
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
new file mode 100755
index 00000000..cfcc883e
--- /dev/null
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/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"
+ }
+}