From 70a0aa7f3f3c86583f688a11d0a8717681f1673c Mon Sep 17 00:00:00 2001 From: Maarten de Waard <maarten@greenhost.nl> Date: Mon, 12 Jul 2021 12:14:45 +0200 Subject: [PATCH] remove obsolete arguments from openappstack/__main__.py --- .gitlab-ci.yml | 5 ++-- .gitlab/ci_scripts/create_vps.sh | 2 -- openappstack/__main__.py | 45 ++++---------------------------- 3 files changed, 7 insertions(+), 45 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f5329159..569532194 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -264,7 +264,7 @@ create-vps: DOMAIN: "openappstack.net" script: - *debug_information - # Creates a VPS based on a custom CI image for which --install-kubernetes + # Creates a VPS based on a custom CI image for which the ansible playbook # has already run. See CONTRIBUTING.md#ci-pipeline-image for more info - bash .gitlab/ci_scripts/create_vps.sh # Make sure .ci.env variables are not lost @@ -306,8 +306,7 @@ setup-openappstack: - chmod 700 ansible - cp ${CLUSTER_DIR}/inventory.yml ansible/ # Set up cluster - # TODO: I set --no-install-openappstack to skip the old installation procedure, should be removed eventually - - python3 -m openappstack $HOSTNAME install --install-kubernetes --no-install-openappstack + - python3 -m openappstack $HOSTNAME install # Customize env file, remove all comments and empty lines - sed "s/1.2.3.4/$IP_ADDRESS/; s/example.org/$FQDN/; s/acme_staging=false/acme_staging=true/; s/acme-v02/acme-staging-v02/; /^\s*#.*$/d; /^\s*$/d" install/.flux.env.example >> ${CLUSTER_DIR}/.flux.env # Deploy secret/oas-cluster-variables diff --git a/.gitlab/ci_scripts/create_vps.sh b/.gitlab/ci_scripts/create_vps.sh index 2fb698c25..ac118ed5c 100644 --- a/.gitlab/ci_scripts/create_vps.sh +++ b/.gitlab/ci_scripts/create_vps.sh @@ -9,8 +9,6 @@ python3 -c "import greenhost_cloud; greenhost_cloud.terminate_droplets_by_name(\ echo "Creating new machine" # Uses a custom disk image. See CONTRIBUTING.md#ci-pipeline-image for more info. python3 -m openappstack $HOSTNAME create \ - --acme-staging \ - --local-flux \ --create-droplet $DOMAIN \ --create-hostname $HOSTNAME \ --ssh-key-id $SSH_KEY_ID \ diff --git a/openappstack/__main__.py b/openappstack/__main__.py index 2f926528f..f4541522b 100755 --- a/openappstack/__main__.py +++ b/openappstack/__main__.py @@ -143,18 +143,6 @@ def main(): # pylint: disable=too-many-statements,too-many-branches,too-many-lo help=('Truncate subdomain so subdomain and domain are shorter than ' '{} characters.'.format(MAX_DOMAIN_LENGTH))) - droplet_creation_group.add_argument( - '--acme-staging', - action='store_true', - help=("Use this for development clusters. Uses Let's Encrypt's " - 'staging environment')) - - droplet_creation_group.add_argument( - '--local-flux', - action='store_true', - 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 " @@ -186,20 +174,7 @@ def main(): # pylint: disable=too-many-statements,too-many-branches,too-many-lo metavar=['PARAM[=VALUE]'], action='append', nargs=1, - help='forward ansible parameters to the ansible-playbook call. If ' - '--install-kubernetes is supplied, parameters are passed to both ' - 'ansible playbooks') - - install_parser.add_argument( - '--install-kubernetes', - action='store_true', - help="Installs k3s on your VPS before installing OpenAppStack") - - install_parser.add_argument( - '--no-install-openappstack', - action='store_true', - help=("Skip openappstack installation. This is useful if you only " - "want a kubernetes cluster.")) + help='forward ansible parameters to the ansible-playbook call.') test_parser = subparsers.add_parser( 'test', @@ -326,9 +301,6 @@ def create(clus, args): # pylint: disable=too-many-branches 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 if args.create_droplet: clus.create_droplet(ssh_key_id=args.ssh_key_id, hostname=args.create_hostname) if args.verbose: @@ -373,17 +345,10 @@ def install(clus, args): """ clus.load_data() - if args.install_kubernetes: - ansible.run_ansible( - clus, - os.path.join(ansible.ANSIBLE_PATH, 'install-kubernetes.yml'), - args.ansible_param) - - if not args.no_install_openappstack: - ansible.run_ansible( - clus, - os.path.join(ansible.ANSIBLE_PATH, 'install-openappstack.yml'), - args.ansible_param) + ansible.run_ansible( + clus, + os.path.join(ansible.ANSIBLE_PATH, 'install-kubernetes.yml'), + args.ansible_param) def test(clus, args): -- GitLab