Skip to content

ctrliq/ascender-install

Repository files navigation

The Ascender installer is a script that makes for relatively easy install of Ascender Automation Platform on Kubernetes platforms of multiple flavors. The installer is being expanded to new Kubernetes platforms as users/contributors allow, and if you have specific needs for a platform not yet supported, please submit an issue to this Github repository.

While Ascender installs on Kubernetes, you don't need to be a guru in Kubernetes, or even have a Kubernetes cluster up and working! For each specified Kubernetes platform, the installer will set up a Kubernetes cluster on your behalf, and set up the cluster access file at its default location of ~/.kube/config. Windows and Network admins rejoice!

Table of Contents

General Prerequisites

  • On the local server (on which the installer script will run), you will need the following prerequisites met:
    • The The OS family must be Rocky, Fedora or CentOS and the major version must be 8 or 9.
      • *For the AKS and GKE installers, this must be version 9.
    • git needs to be installed
      • $ sudo dnf install git -y
    • The ansible inventory file file needs to be changed to:
      • ascender_host
        • ansible_host needs to be a set to a server that hosts the kube-apiserver kubernetes cluster access or that you want to eventually host the kube-apiserver.
        • ansible_user needs to set to a user that can escalate to root with become (if different than your logged in user)
        • A port needs to be open for SSH access (typically TCP port 22). If you choose to have SSH accept connections on a different port, you need to specify this port with the built-in host variable ansible_port.
    • ansible-core will have to be installed, but the setup script will install it if it is not already there.
  • On ascender_host, the following is required:
    • If a Kubernetes cluster is already up, you will need the kubeconfig file, located at ~/.kube/config. The server IP address in the cluster section of this file will determine the cluster where Ascender will be installed. This cluster must be up and running at the time of install.
    • If a kubernetes cluster is to be set up, then the installer script it will create the kubeconfig for you automatically.

Optional Components

  • An external PostgreSQL server that the Ascender application can access. If not specified, the AWX Operator responsible for installing Ascender will create a managed PostgreSQL server.

Offline Installation

For certain Kubernetes platforms (such as k3s, kubeadm, rke2), the Ascender installer supports installation for clusters that do not have outside internet access. In these cases, you can either use:

  • An included bundle of container images (this is the case for k3s)
  • Move the Ascender and Ledger container images into an internal container registry for the installer to consume (this is the case for rke2 and kubeadm)

A bundled AWX operator is also included for the purposes of offline install.

For more detailed instructions, see the section on the corresponding Kubernetes platform.

Configuration File and Inventory

There is a default configuration file that will hold all of the options required to set up your installation properly. While this file is comprehensive, you can find more platform-specific config file templates in the respective Kubernetes platform install instructions directory.

Additionally, there is an executable script in this directory called config_vars.sh that will generate a config file based on user input, named custom.config.yml. custon.config.yml is listed in .gitignore, and as such is the suggested/preferred method of setting your install variables.

The Ascender Install script also uses the Ansible inventory file, inventory, located in the top level directory of this repository.

For both the config file and inventory files, you will find templates for each Kubernetes distribution in its corresponding directory in docs. You can use these templates as guides for how custom.config.ml and inventory should look for your particular install.

The Uninstall section of this tutorial references two of the variables that need to be set:

  • k8s_platform: The Kubernetes platform Ascender is being installed on. This could be K3s, EKS, GKE, or AKS.
  • tmp_dir: The directory on the server running the install script, where temporary artifacts will be stored.

All of the variables and flags in these files have their description/proper usage directly present in the comments.

Installation Instructions by Kubernetes Platform

Adding Components/Configuration Changes

Consider a situation where you have already installed Ascender, and wish to change one or more of the attributes of how it is deployed. Some of these changes may include:

  • Moving from non-SSL to an SSL connection
  • Installing Ledger when you may have only installed Ascender first
  • Changing the version of Ascender and or Ledger that is installed

This can be accomplished by either running config_vars.sh again, or editing an existing custom.config.yml, in each case, changing the desired install variables. You can then rerun setup.sh.`

Upgrading Ascender

Upgrading Ascender is as simple as changing the Ascender container image version/tag that is being used in your deployment, and rerunning the installation script.

Assuming you have an existing custom.config.yml file that contains the variables used to perform your initial install of Ascender, open the file and set the values of these four variables:

  • kube_install: Set to false as you already have a kubernetes cluster on which Ascender is running.
  • download_kubeconfig: Set to false as you already have a valid KUBECONFIG file to authenticate to your existing cluster
  • ASCENDER_VERSION: This needs to be set to the release of Ascender you wish to upgrade to. As an example, a release should be in the format 24.0.0. The list of all releases can be found here: Ascender Releases.
  • image_pull_policy: Set to Always, as this will force the Ascender web container image to be pulled.

After having changed these four variables, re-run the installer script from the top level directory:

sudo < ASCENDER-INSTALL-SOURCE >/setup.sh

Uninstall

After running setup.sh, tmp_dir will contain timestamped kubernetes manifests for:

  • ascender-deployment-{{ k8s_platform }}.yml
  • ledger-{{ k8s_platform }}.yml (if you installed Ledger)
  • kustomization.yml

Remove the timestamp from the filename and then run the following commands from within `tmp_dir``:

  • $ kubectl delete -f ascender-deployment-{{ k8s_platform }}.yml
  • $ kubectl delete -f ledger-{{ k8s_platform }}.yml
  • $ kubectl delete -k .

Running the Ascender deletion will remove all related deployments and statefulsets, however, persistent volumes and secrets will remain. To enforce secrets also getting removed, you can use ascender_garbage_collect_secrets: true in the default.config.yml file.

Reporting Issues

If you're experiencing a problem that you feel is a bug in the installer or have ideas for improving the installer, we encourage you to open a Github issue and share your feedback.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published