Skip to content
Snippets Groups Projects
Verified Commit c0bb4e3b authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

try using my custom disk image for CI

TRIGGER_JOBS=ci-test-image-build
parent 3c2ff165
No related branches found
No related tags found
No related merge requests found
......@@ -16,4 +16,5 @@ python3 -m openappstack $HOSTNAME create \
--ssh-key-id $SSH_KEY_ID \
--create-domain-records \
--subdomain $SUBDOMAIN \
--disk-image-id '-7121' \
--truncate-subdomain
......@@ -147,6 +147,11 @@ def main(): # pylint: disable=too-many-statements,too-many-branches,too-many-lo
help=("Use this for development clusters. Uses an in-cluster "
'auto-update feed'))
droplet_creation_group.add_argument(
'--disk-image-id',
help=("Custom disk image ID. Use negative value for a custom template "
"ID, use positive values for operating system IDs"))
install_parser = subparsers.add_parser(
'install',
help=("Use this to run the ansible playbook that sets up your VPS to run "
......@@ -312,6 +317,9 @@ def create(clus, args): # pylint: disable=too-many-branches
clus.domain = fqdn
if args.disk_image_id:
clus.disk_image_id = args.disk_image_id
# Set acme_staging to False so we use Let's Encrypt's live environment
if args.acme_staging:
clus.acme_staging = True
......
......@@ -65,6 +65,8 @@ class Cluster:
# Load data from inventory.yml and settings.yml
if load_data:
self.load_data()
# Can be used to use a custom disk image.
self.disk_image_id = DEFAULT_IMAGE
def load_data(self):
"""
......@@ -119,7 +121,7 @@ class Cluster:
region=DEFAULT_REGION,
size=ram,
disk=DEFAULT_DISK_SIZE_GB,
image=DEFAULT_IMAGE)
image=self.disk_image_id)
droplet_id = droplet['droplet']['id']
log.info('Created droplet id: %s', droplet_id)
greenhost_cloud.wait_for_state(droplet_id, 'running')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment