mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
oracle: remove custom gzipped kernel
Since Xen HVM is supported on Oracle Cloud, the default kernels compressed with XZ can be booted with no problem.
This commit is contained in:
parent
925986e4c6
commit
992100d00a
5 changed files with 29 additions and 13 deletions
|
@ -3,10 +3,6 @@ Oracle
|
|||
|
||||
The Oracle provider creates RAW images compressed in a `.tar.gz` tarball. Those image have to be uploaded using the web interface of the Oracle Compute Cloud Service dashboard.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Oracle Compute Cloud currently supports only kernel images compressed with GZIP. Debian kernels from 3.6 and up are compressed with XZ and will not work. If you plan to bootstrap a `jessie` image, for instance, you will have to download or build a custom kernel. The manifest examples expects a custom kernel package located at `/tmp/linux-image-3.16.7-ckt11-gzip-1_amd64.deb`.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Install `apt`/`pip` dependencies:
|
||||
|
@ -14,11 +10,6 @@ Install `apt`/`pip` dependencies:
|
|||
$ sudo apt-get install debootstrap git parted kpartx qemu-utils python-pip
|
||||
$ sudo pip install termcolor jsonschema fysom docopt pyyaml
|
||||
|
||||
Download a custom-built gzipped kernel:
|
||||
|
||||
$ cd /tmp/
|
||||
$ wget http://viridian.ilieve.org/kernel/linux-image-3.16.7-ckt11-gzip-1_amd64.deb
|
||||
|
||||
Clone this repository:
|
||||
|
||||
$ cd ~/
|
||||
|
|
|
@ -5,6 +5,7 @@ from bootstrapvz.common.tasks import ssh
|
|||
from bootstrapvz.common.tasks import volume
|
||||
import tasks.image
|
||||
import tasks.network
|
||||
import tasks.packages
|
||||
|
||||
|
||||
def validate_manifest(data, validator, error):
|
||||
|
@ -24,6 +25,7 @@ def resolve_tasks(taskset, manifest):
|
|||
volume.Delete,
|
||||
tasks.image.CreateImageTarball,
|
||||
tasks.network.InstallDHCPCD,
|
||||
tasks.packages.DefaultPackages,
|
||||
])
|
||||
|
||||
|
||||
|
|
11
bootstrapvz/providers/oracle/tasks/packages-kernels.yml
Normal file
11
bootstrapvz/providers/oracle/tasks/packages-kernels.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
# This is a mapping of Debian release codenames to processor architectures to kernel packages
|
||||
jessie:
|
||||
amd64: linux-image-amd64
|
||||
i386: linux-image-686-pae
|
||||
stretch:
|
||||
amd64: linux-image-amd64
|
||||
i386: linux-image-686-pae
|
||||
sid:
|
||||
amd64: linux-image-amd64
|
||||
i386: linux-image-686-pae
|
16
bootstrapvz/providers/oracle/tasks/packages.py
Normal file
16
bootstrapvz/providers/oracle/tasks/packages.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from bootstrapvz.base import Task
|
||||
from bootstrapvz.common import phases
|
||||
from bootstrapvz.common.tools import config_get
|
||||
import os.path
|
||||
|
||||
|
||||
class DefaultPackages(Task):
|
||||
description = 'Adding image packages required for Oracle Cloud'
|
||||
phase = phases.preparation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
kernel_packages_path = os.path.join(os.path.dirname(__file__), 'packages-kernels.yml')
|
||||
kernel_package = config_get(kernel_packages_path, [info.manifest.release.codename,
|
||||
info.manifest.system['architecture']])
|
||||
info.packages.add(kernel_package)
|
|
@ -18,10 +18,6 @@ volume:
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue