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
|
||||
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
|
||||
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
|
||||
|
@ -51,16 +51,6 @@ write_files:
|
||||
- content: target
|
||||
path: /etc/nailgun_systemtype
|
||||
|
||||
|
||||
yum_repos:
|
||||
{% for reponame, repourl in common.ks_repos.items() %}
|
||||
{{ reponame }}:
|
||||
baseurl: {{ repourl }}
|
||||
enabled: true
|
||||
gpgcheck: false
|
||||
{% endfor %}
|
||||
|
||||
|
||||
mcollective:
|
||||
conf:
|
||||
main_collective: mcollective
|
||||
|
@ -39,13 +39,6 @@ write_files:
|
||||
path: /etc/nailgun-agent/config.yaml
|
||||
- content: target
|
||||
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:
|
||||
conf:
|
||||
|
@ -321,9 +321,7 @@ class Nailgun(object):
|
||||
admin_mask=admin_interface['netmask'],
|
||||
admin_iface_name=admin_interface['name'],
|
||||
timezone=data['ks_meta'].get('timezone', 'America/Los_Angeles'),
|
||||
ks_repos=dict(map(lambda x: x.strip('"').strip("'"),
|
||||
item.split('=')) for item in
|
||||
data['ks_meta']['repo_metadata'].split(','))
|
||||
ks_repos=data['ks_meta']['repo_setup']['repos']
|
||||
)
|
||||
|
||||
LOG.debug('Adding puppet parameters')
|
||||
|
@ -106,7 +106,26 @@ PROVISION_SAMPLE_DATA = {
|
||||
"mco_auto_setup": 1,
|
||||
"auth_key": "fake_auth_key",
|
||||
"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": {
|
||||
"kernel_params": "console=ttyS0,9600 console=tty0 rootdelay=90 "
|
||||
"nomodeset",
|
||||
@ -524,8 +543,26 @@ class TestNailgun(test_base.BaseTestCase):
|
||||
self.assertEqual('marionette', cd_scheme.mcollective.password)
|
||||
self.assertEqual('rabbitmq', cd_scheme.mcollective.connector)
|
||||
self.assertEqual('pro_fi-le', cd_scheme.profile)
|
||||
self.assertEqual({'repo1': 'repo1_url', 'repo2': 'repo2_url'},
|
||||
cd_scheme.common.ks_repos)
|
||||
self.assertEqual(
|
||||
[
|
||||
{
|
||||
"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')
|
||||
def test_partition_scheme(self, mock_lbd):
|
||||
|
Loading…
Reference in New Issue
Block a user