IBP: removed repo preconfiguration from cloud-init
New deployment task flow assumes we have the deployment stage which configures repos on a node just before running puppet. So, we don't need to perform this repo pre-configuration in fuel agent any more. Change-Id: Ib3ffc2944d20470476fe800a1bf95382780a4bf9 Implements: blueprint consume-external-ubuntu
This commit is contained in:
parent
53263e5f32
commit
3ab2a665b5
@ -102,8 +102,6 @@ cloud-init-per instance nailgun_agent /bin/sh -c 'echo "flock -w 0 -o /var/lock/
|
|||||||
# Copying default bash settings to the root directory
|
# Copying default bash settings to the root directory
|
||||||
cloud-init-per instance skel_bash cp -f /etc/skel/.bash* /root/
|
cloud-init-per instance skel_bash cp -f /etc/skel/.bash* /root/
|
||||||
|
|
||||||
cloud-init-per instance clean_repos find /etc/yum.repos.d/. -name '*.repo' -delete
|
|
||||||
|
|
||||||
# Puppet config
|
# Puppet config
|
||||||
cloud-init-per instance hiera_puppet mkdir -p /etc/puppet /var/lib/hiera
|
cloud-init-per instance hiera_puppet mkdir -p /etc/puppet /var/lib/hiera
|
||||||
cloud-init-per instance touch_puppet touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
|
cloud-init-per instance touch_puppet touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
|
||||||
|
@ -51,16 +51,6 @@ write_files:
|
|||||||
- content: target
|
- content: target
|
||||||
path: /etc/nailgun_systemtype
|
path: /etc/nailgun_systemtype
|
||||||
|
|
||||||
|
|
||||||
yum_repos:
|
|
||||||
{% for reponame, repourl in common.ks_repos.items() %}
|
|
||||||
{{ reponame }}:
|
|
||||||
baseurl: {{ repourl }}
|
|
||||||
enabled: true
|
|
||||||
gpgcheck: false
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
|
|
||||||
mcollective:
|
mcollective:
|
||||||
conf:
|
conf:
|
||||||
main_collective: mcollective
|
main_collective: mcollective
|
||||||
|
@ -39,13 +39,6 @@ write_files:
|
|||||||
path: /etc/nailgun-agent/config.yaml
|
path: /etc/nailgun-agent/config.yaml
|
||||||
- content: target
|
- content: target
|
||||||
path: /etc/nailgun_systemtype
|
path: /etc/nailgun_systemtype
|
||||||
- content: APT::Get::AllowUnauthenticated 1;
|
|
||||||
path: /etc/apt/apt.conf.d/02mirantis-allow-unsigned
|
|
||||||
|
|
||||||
apt_sources:
|
|
||||||
{% for reponame, repourl in common.ks_repos.items() %}
|
|
||||||
- source: deb {{ repourl }}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
mcollective:
|
mcollective:
|
||||||
conf:
|
conf:
|
||||||
|
@ -321,9 +321,7 @@ class Nailgun(object):
|
|||||||
admin_mask=admin_interface['netmask'],
|
admin_mask=admin_interface['netmask'],
|
||||||
admin_iface_name=admin_interface['name'],
|
admin_iface_name=admin_interface['name'],
|
||||||
timezone=data['ks_meta'].get('timezone', 'America/Los_Angeles'),
|
timezone=data['ks_meta'].get('timezone', 'America/Los_Angeles'),
|
||||||
ks_repos=dict(map(lambda x: x.strip('"').strip("'"),
|
ks_repos=data['ks_meta']['repo_setup']['repos']
|
||||||
item.split('=')) for item in
|
|
||||||
data['ks_meta']['repo_metadata'].split(','))
|
|
||||||
)
|
)
|
||||||
|
|
||||||
LOG.debug('Adding puppet parameters')
|
LOG.debug('Adding puppet parameters')
|
||||||
|
@ -106,7 +106,26 @@ PROVISION_SAMPLE_DATA = {
|
|||||||
"mco_auto_setup": 1,
|
"mco_auto_setup": 1,
|
||||||
"auth_key": "fake_auth_key",
|
"auth_key": "fake_auth_key",
|
||||||
"authorized_keys": ["fake_authorized_key1", "fake_authorized_key2"],
|
"authorized_keys": ["fake_authorized_key1", "fake_authorized_key2"],
|
||||||
"repo_metadata": 'repo1="repo1_url",' + "repo2='repo2_url'",
|
"repo_setup": {
|
||||||
|
"repos": [
|
||||||
|
{
|
||||||
|
"name": "repo1",
|
||||||
|
"type": "deb",
|
||||||
|
"uri": "uri1",
|
||||||
|
"suite": "suite",
|
||||||
|
"section": "section",
|
||||||
|
"priority": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "repo2",
|
||||||
|
"type": "deb",
|
||||||
|
"uri": "uri2",
|
||||||
|
"suite": "suite",
|
||||||
|
"section": "section",
|
||||||
|
"priority": 1001
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"pm_data": {
|
"pm_data": {
|
||||||
"kernel_params": "console=ttyS0,9600 console=tty0 rootdelay=90 "
|
"kernel_params": "console=ttyS0,9600 console=tty0 rootdelay=90 "
|
||||||
"nomodeset",
|
"nomodeset",
|
||||||
@ -524,8 +543,26 @@ class TestNailgun(test_base.BaseTestCase):
|
|||||||
self.assertEqual('marionette', cd_scheme.mcollective.password)
|
self.assertEqual('marionette', cd_scheme.mcollective.password)
|
||||||
self.assertEqual('rabbitmq', cd_scheme.mcollective.connector)
|
self.assertEqual('rabbitmq', cd_scheme.mcollective.connector)
|
||||||
self.assertEqual('pro_fi-le', cd_scheme.profile)
|
self.assertEqual('pro_fi-le', cd_scheme.profile)
|
||||||
self.assertEqual({'repo1': 'repo1_url', 'repo2': 'repo2_url'},
|
self.assertEqual(
|
||||||
cd_scheme.common.ks_repos)
|
[
|
||||||
|
{
|
||||||
|
"name": "repo1",
|
||||||
|
"type": "deb",
|
||||||
|
"uri": "uri1",
|
||||||
|
"suite": "suite",
|
||||||
|
"section": "section",
|
||||||
|
"priority": 1001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "repo2",
|
||||||
|
"type": "deb",
|
||||||
|
"uri": "uri2",
|
||||||
|
"suite": "suite",
|
||||||
|
"section": "section",
|
||||||
|
"priority": 1001
|
||||||
|
}
|
||||||
|
],
|
||||||
|
cd_scheme.common.ks_repos)
|
||||||
|
|
||||||
@mock.patch.object(hu, 'list_block_devices')
|
@mock.patch.object(hu, 'list_block_devices')
|
||||||
def test_partition_scheme(self, mock_lbd):
|
def test_partition_scheme(self, mock_lbd):
|
||||||
|
Loading…
Reference in New Issue
Block a user