oracle: remove cloud-init customization

It is working now out-of-the-box with "Ec2" metadata source.
This commit is contained in:
Tiago Ilieve 2016-01-28 23:20:25 -02:00
parent 7786b9362d
commit c22247be81
6 changed files with 3 additions and 52 deletions

View file

@ -32,5 +32,3 @@ Create a new local branch from this one:
Bootstrap a new image: Bootstrap a new image:
$ sudo ./bootstrap-vz --debug manifests/examples/oracle/jessie.yml $ sudo ./bootstrap-vz --debug manifests/examples/oracle/jessie.yml
P.s.: you probably want to change the root password define on the example manifest, as `cloud-init` isn't properly fetching public keys on Oracle Compute Cloud right now.

View file

@ -29,9 +29,6 @@ def resolve_tasks(taskset, manifest):
tasks.network.InstallDHCPCD, tasks.network.InstallDHCPCD,
]) ])
if 'cloud_init' in manifest.plugins:
taskset.add(tasks.network.SetCloudInitMetadataURL)
def resolve_rollback_tasks(taskset, manifest, completed, counter_task): def resolve_rollback_tasks(taskset, manifest, completed, counter_task):
taskset.update(task_groups.get_standard_rollback_tasks(completed)) taskset.update(task_groups.get_standard_rollback_tasks(completed))

View file

@ -1,4 +0,0 @@
# Created by bootstrap-vz, can be generated using "dpkg-reconfigure cloud-init"
datasource:
Ec2:
metadata_urls: [ 'http://192.0.0.192/' ]

View file

@ -14,14 +14,3 @@ class InstallDHCPCD(Task):
info.packages.add('dhcpcd5') info.packages.add('dhcpcd5')
info.exclude_packages.add('isc-dhcp-client') info.exclude_packages.add('isc-dhcp-client')
info.exclude_packages.add('isc-dhcp-common') info.exclude_packages.add('isc-dhcp-common')
class SetCloudInitMetadataURL(Task):
description = 'Setting cloud-init metadata URL'
phase = phases.system_modification
@classmethod
def run(cls, info):
cfg_src = os.path.join(assets, 'cloud-init/90_dpkg.cfg')
cfg_dst = os.path.join(info.root, 'etc/cloud/cloud.cfg.d/90_dpkg.cfg')
shutil.copy(cfg_src, cfg_dst)

View file

@ -1,30 +0,0 @@
---
name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
provider:
name: oracle
bootstrapper:
workspace: /target
system:
release: jessie
architecture: amd64
bootloader: grub
charmap: UTF-8
locale: en_US
timezone: UTC
volume:
backing: raw
partitions:
type: msdos
root:
filesystem: ext4
size: 8GiB
packages:
install:
- initramfs-tools
- /tmp/linux-image-3.16.7-ckt11-gzip-1_amd64.deb
plugins:
cloud_init:
username: opc
metadata_sources: Ec2
root_password:
password: ARealSecurePassword

View file

@ -23,5 +23,6 @@ packages:
- initramfs-tools - initramfs-tools
- /tmp/linux-image-3.16.7-ckt11-gzip-1_amd64.deb - /tmp/linux-image-3.16.7-ckt11-gzip-1_amd64.deb
plugins: plugins:
root_password: cloud_init:
password: ARealSecurePassword username: opc
metadata_sources: Ec2