mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Merge pull request #734 from bgilbert/oracle
Add Oracle OCI image format
This commit is contained in:
commit
b48afe581e
@ -12,6 +12,7 @@ VALID_IMG_TYPES=(
|
|||||||
iso
|
iso
|
||||||
openstack
|
openstack
|
||||||
openstack_mini
|
openstack_mini
|
||||||
|
oracle_oci
|
||||||
qemu
|
qemu
|
||||||
qemu_uefi
|
qemu_uefi
|
||||||
qemu_uefi_secure
|
qemu_uefi_secure
|
||||||
@ -52,6 +53,7 @@ VALID_OEM_PACKAGES=(
|
|||||||
exoscale
|
exoscale
|
||||||
gce
|
gce
|
||||||
hyperv
|
hyperv
|
||||||
|
oracle-oci
|
||||||
rackspace
|
rackspace
|
||||||
rackspace-onmetal
|
rackspace-onmetal
|
||||||
vagrant
|
vagrant
|
||||||
@ -241,6 +243,10 @@ IMG_gce_CONF_FORMAT=gce
|
|||||||
IMG_gce_OEM_PACKAGE=oem-gce
|
IMG_gce_OEM_PACKAGE=oem-gce
|
||||||
IMG_gce_OEM_ACI=gce
|
IMG_gce_OEM_ACI=gce
|
||||||
|
|
||||||
|
## Oracle OCI
|
||||||
|
IMG_oracle_oci_DISK_FORMAT=qcow2
|
||||||
|
IMG_oracle_oci_OEM_PACKAGE=oem-oracle-oci
|
||||||
|
|
||||||
## rackspace
|
## rackspace
|
||||||
IMG_rackspace_OEM_PACKAGE=oem-rackspace
|
IMG_rackspace_OEM_PACKAGE=oem-rackspace
|
||||||
IMG_rackspace_vhd_DISK_FORMAT=vhd
|
IMG_rackspace_vhd_DISK_FORMAT=vhd
|
||||||
|
@ -10,13 +10,18 @@ availability_domain=$(get_availability_domain "${compartment}")
|
|||||||
image_id=$(get_an_image_id "${compartment}")
|
image_id=$(get_an_image_id "${compartment}")
|
||||||
subnet_id=$(get_subnet_id "${compartment}" "${availability_domain}")
|
subnet_id=$(get_subnet_id "${compartment}" "${availability_domain}")
|
||||||
name=
|
name=
|
||||||
shape="BM.Standard1.36"
|
shape="VM.Standard1.1"
|
||||||
ipxe=0
|
ipxe=0
|
||||||
ignition=
|
ignition=
|
||||||
|
keyfile="$HOME/.ssh/id_rsa.pub"
|
||||||
baseurl="http://alpha.release.core-os.net/amd64-usr/current"
|
baseurl="http://alpha.release.core-os.net/amd64-usr/current"
|
||||||
bucket_base="users.developer.core-os.net/$USER/bmcs"
|
bucket_base="users.developer.core-os.net/$USER/bmcs"
|
||||||
kargs=
|
kargs=
|
||||||
|
|
||||||
|
if [[ ! -f "$keyfile" ]]; then
|
||||||
|
keyfile=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Parse args
|
# Parse args
|
||||||
usage="Usage: $0 [args] -n name
|
usage="Usage: $0 [args] -n name
|
||||||
Options:
|
Options:
|
||||||
@ -26,6 +31,7 @@ Options:
|
|||||||
-s SHAPE Instance shape (default: ${shape})
|
-s SHAPE Instance shape (default: ${shape})
|
||||||
-S SUBNET-ID Subnet ID to use (default: ${subnet_id})
|
-S SUBNET-ID Subnet ID to use (default: ${subnet_id})
|
||||||
-i IGNITION Path to Ignition config
|
-i IGNITION Path to Ignition config
|
||||||
|
-A SSH-KEYS Path to SSH keys (default: ${keyfile})
|
||||||
-p Boot with iPXE
|
-p Boot with iPXE
|
||||||
-I IMAGE-ID Image ID to use; only relevant for non-iPXE (default: ${image_id})
|
-I IMAGE-ID Image ID to use; only relevant for non-iPXE (default: ${image_id})
|
||||||
-b BASEURL URL to the image mirror; only relevant for iPXE (default: ${baseurl})
|
-b BASEURL URL to the image mirror; only relevant for iPXE (default: ${baseurl})
|
||||||
@ -33,7 +39,7 @@ Options:
|
|||||||
-k ARGS Additional kernel command line arguments for iPXE script
|
-k ARGS Additional kernel command line arguments for iPXE script
|
||||||
-h This ;-)
|
-h This ;-)
|
||||||
"
|
"
|
||||||
while getopts "c:a:n:s:S:i:pI:b:B:k:h" OPTION
|
while getopts "c:a:n:s:S:i:A:pI:b:B:k:h" OPTION
|
||||||
do
|
do
|
||||||
case "${OPTION}" in
|
case "${OPTION}" in
|
||||||
c) compartment="${OPTARG}" ;;
|
c) compartment="${OPTARG}" ;;
|
||||||
@ -42,6 +48,7 @@ do
|
|||||||
s) shape="${OPTARG}" ;;
|
s) shape="${OPTARG}" ;;
|
||||||
S) subnet_id="${OPTARG}" ;;
|
S) subnet_id="${OPTARG}" ;;
|
||||||
i) ignition="${OPTARG}" ;;
|
i) ignition="${OPTARG}" ;;
|
||||||
|
A) keyfile="${OPTARG}" ;;
|
||||||
p) ipxe=1 ;;
|
p) ipxe=1 ;;
|
||||||
I) image_id="${OPTARG}" ;;
|
I) image_id="${OPTARG}" ;;
|
||||||
b) baseurl="${OPTARG}" ;;
|
b) baseurl="${OPTARG}" ;;
|
||||||
@ -97,6 +104,9 @@ fi
|
|||||||
if [[ -n "${ignition}" ]]; then
|
if [[ -n "${ignition}" ]]; then
|
||||||
launch_args+=("--user-data-file" "${ignition}")
|
launch_args+=("--user-data-file" "${ignition}")
|
||||||
fi
|
fi
|
||||||
|
if [[ -n "${keyfile}" ]]; then
|
||||||
|
launch_args+=("--ssh-authorized-keys-file" "${keyfile}")
|
||||||
|
fi
|
||||||
bmcs compute instance launch \
|
bmcs compute instance launch \
|
||||||
--availability-domain "${availability_domain}" \
|
--availability-domain "${availability_domain}" \
|
||||||
--compartment-id "${compartment}" \
|
--compartment-id "${compartment}" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user