Skip to content

Commit

Permalink
images: add image descriptors
Browse files Browse the repository at this point in the history
aws, azure, ciao-networking, cloud, containers, gce, and hyperv
image descriptors.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
  • Loading branch information
Leandro Dorileo authored and Leandro Dorileo committed Oct 26, 2018
1 parent 8bbaff2 commit 71305a8
Show file tree
Hide file tree
Showing 15 changed files with 595 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scripts/aws-disable-root.sh
@@ -0,0 +1,27 @@
#!/bin/bash

# Root login must bedisabled aws images

usage() {
echo "usage: $0 [chrootpath]"
echo "Provide path to existing chroot"
exit 1
}


main() {
local CHROOTPATH=$1
sudo mkdir -p ${CHROOTPATH}/etc/ssh/
sudo echo "PermitRootLogin no" >> ${CHROOTPATH}/etc/ssh/sshd_config

}

if [ $# -eq 0 ]; then
usage
fi

if [ ! -d "$1" ]; then
usage
fi

main $@
39 changes: 39 additions & 0 deletions scripts/aws.yaml
@@ -0,0 +1,39 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "aws", file: "aws.img"}
]

targetMedia:
- name: ${aws}
size: "512M"
type: disk
children:
- name: ${aws}1
fstype: ext4
mountpoint: /
options: -b 4096 -O ^64bit
size: "512M"
type: part

bundles: [
openssh-server,
os-cloudguest-aws,
os-core,
os-core-update,
]

postArchive: false
postReboot: false
telemetry: false
legacyBios: true

keyboard: us
language: en_US.UTF-8
kernel: kernel-aws

post-install: [
{cmd: "scripts/aws-disable-root.sh ${chrootDir}"}
]
40 changes: 40 additions & 0 deletions scripts/azure-docker.yaml
@@ -0,0 +1,40 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "azure-docker", file: "azure-docker.img"}
]

targetMedia:
- name: ${azure-docker}
size: "20G"
type: disk
children:
- name: ${azure-docker}1
fstype: ext4
mountpoint: /
options: -O ^64bit
size: "20G"
type: part

bundles: [
cloud-native-basic,
editors,
network-basic,
openssh-server,
os-cloudguest-azure,
os-core,
os-core-update,
storage-utils,
sysadmin-basic,
]

postArchive: false
postReboot: false
telemetry: false
legacyBios: true

keyboard: us
language: en_US.UTF-8
kernel: kernel-hyperv
40 changes: 40 additions & 0 deletions scripts/azure-machine-learning.yaml
@@ -0,0 +1,40 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "azure-machine-learning.img"}
]

targetMedia:
- name: ${bdevice}
size: "20G"
type: disk
children:
- name: ${bdevice}1
fstype: ext4
mountpoint: /
options: -O ^64bit
size: "20G"
type: part

bundles: [
editors,
machine-learning-basic,
network-basic,
openssh-server,
os-cloudguest-azure,
os-core,
os-core-update,
storage-utils,
sysadmin-basic,
]

postArchive: false
postReboot: false
telemetry: false
legacyBios: true

keyboard: us
language: en_US.UTF-8
kernel: kernel-hyperv
39 changes: 39 additions & 0 deletions scripts/azure.yaml
@@ -0,0 +1,39 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "azure", file: "azure.img"}
]

targetMedia:
- name: ${azure}
size: "20G"
type: disk
children:
- name: ${azure}1
fstype: ext4
mountpoint: /
options: -O ^64bit
size: "20G"
type: part

bundles: [
editors,
network-basic,
openssh-server,
os-cloudguest-azure,
os-core,
os-core-update,
storage-utils,
sysadmin-basic,
]

postArchive: false
postReboot: false
telemetry: false
legacyBios: true

keyboard: us
language: en_US.UTF-8
kernel: kernel-hyperv
40 changes: 40 additions & 0 deletions scripts/ciao-networking.yaml
@@ -0,0 +1,40 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "cloud.img"}
]

targetMedia:
- name: ${bdevice}
size: "864M"
type: disk
children:
- name: ${bdevice}1
fstype: vfat
mountpoint: /boot
size: "64M"
type: part
- name: ${bdevice}2
fstype: ext4
mountpoint: /
size: "800M"
type: part

bundles: [
os-core,
os-core-update,
os-cloudguest,
openssh-server,
bootloader,
]

autoUpdate: false
postArchive: false
postReboot: false
telemetry: false

keyboard: us
language: en_US.UTF-8
kernel: kernel-kvm
41 changes: 41 additions & 0 deletions scripts/cloud-docker.yaml
@@ -0,0 +1,41 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "cloud-docker.img"}
]

targetMedia:
- name: ${bdevice}
size: "2.07G"
type: disk
children:
- name: ${bdevice}1
fstype: vfat
mountpoint: /boot
size: "64M"
type: part
- name: ${bdevice}2
fstype: ext4
mountpoint: /
size: "2G"
type: part

bundles: [
bootloader,
containers-basic,
openssh-server,
os-cloudguest,
os-core,
os-core-update,
]

autoUpdate: false
postArchive: false
postReboot: false
telemetry: false

keyboard: us
language: en_US.UTF-8
kernel: kernel-kvm
40 changes: 40 additions & 0 deletions scripts/cloud.yaml
@@ -0,0 +1,40 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "cloud.img"}
]

targetMedia:
- name: ${bdevice}
size: "864M"
type: disk
children:
- name: ${bdevice}1
fstype: vfat
mountpoint: /boot
size: "64M"
type: part
- name: ${bdevice}2
fstype: ext4
mountpoint: /
size: "800M"
type: part

bundles: [
bootloader,
cloud-network,
os-cloudguest,
os-core,
os-core-update,
]

autoUpdate: false
postArchive: false
postReboot: false
telemetry: false

keyboard: us
language: en_US.UTF-8
kernel: kernel-kvm
34 changes: 34 additions & 0 deletions scripts/containers.yaml
@@ -0,0 +1,34 @@
#clear-linux-config

# switch between aliases if you want to install to an actuall block device
# i.e /dev/sda
block-devices: [
{name: "bdevice", file: "containers.img"}
]

targetMedia:
- name: ${bdevice}
size: "864M"
type: disk
children:
- name: ${bdevice}1
fstype: ext4
options: -b 4096
mountpoint: /
size: "224M"
type: part

bundles: [
os-core,
os-clear-containers,
]

autoUpdate: false
postArchive: false
postReboot: false
telemetry: false
legacyBios: true

keyboard: us
language: en_US.UTF-8
kernel: kernel-kvm
28 changes: 28 additions & 0 deletions scripts/gce-image-google-sudoers-setup.sh
@@ -0,0 +1,28 @@
#!/bin/bash

# This script creates the sudoers elements that
# GCE expects in the image to add user to google-sudoers
# whe a user key is injected

usage() {
echo "Provide path to existing chroot"
exit 1
}


main() {
local CHROOTPATH=$1
sudo touch ${CHROOTPATH}/etc/sudoers
sudo chmod 440 ${CHROOTPATH}/etc/sudoers
sudo mkdir ${CHROOTPATH}/etc/sudoers.d
}

if [ $# -eq 0 ]; then
usage
fi

if [ ! -d "$1" ]; then
usage
fi

main $@

0 comments on commit 71305a8

Please sign in to comment.