Skip to main content
NexusOne command-line tools, such as core and modules deployer, Kyuubi batch submit tool, and nx1 require setting up authentication manually.

Core and modules deployer

The core and modules deployer needs access to your Kubernetes cluster’s API server so it can deploy the core and modules tiers of NexusOne.

Kubeconfig

The shared_service_deployer.py script resolves your cluster credentials in the following order:
  1. The --kubeconfig command-line option, if you pass one.
  2. In-cluster credentials, if the script itself happens to be running inside a pod.
  3. Your default kubeconfig, usually ~/.kube/config, if neither of the preceding options applies.
Authenticating to your cluster involves the following two different identities:
  • kubeconfig’s identity: The shared_service_deployer.py script uses your kubeconfig’s identity to talk to the Kubernetes API directly. It creates a target namespace, a terraform-deployer ServiceAccount, and a Kubernetes Job. To do all of that, the identity your kubeconfig authenticates as needs permission to create the following:
    • Namespaces
    • ServiceAccounts, Roles, and RoleBindings
    • ClusterRoles and ClusterRoleBindings
    • Jobs
  • terraform-deployer ServiceAccount’s identity: This is what the Kubernetes Job’s pod runs as once created. Terraform uses this identity to create and manage every resource inside a target namespace.
If a NexusOne deployment fails with a permissions error, then check your kubeconfig and the terraform-deployer ServiceAccount separately. Each needs its own permissions, and the fix depends on which one is missing them.

nx1

The nx1 tool supports three authentication methods. If you configure more than one, then NexusOne applies priority in the following order:
  1. Command-line options
  2. Environment variables
  3. Profile

Command-line options

The command-line options authentication method passes authentication values directly to the nx1 command at runtime. The names of the command-line options include:
  • --api_key: API key
  • --host: API host
To use this method, take the following steps:
  1. Get your API key.
  2. Run the nx1 command and include both options.

Environment variables

The environment variables authentication method uses variables configured on the command line. The required variables include:
  • NX1_API_KEY: API key
  • NX1_HOST: API host
To use this method, take the following steps:
  1. Get your API key.
  2. Set the environment variables.
  3. Run the nx1 command.

Profile

The profile authentication method uses a configuration file stored in a default directory. The file contains details of different profiles. Profiles can represent different environments, such as development, staging, and production. They allow you to store multiple credentials and switch between them easily without re-entering your credentials. The default NexusOne directory is the following:
The file contents are in YAML format and follow this structure.
To use this method, take the following steps:
  1. Get your API key.
  2. Create the new directory and file.
  3. Add a default profile.
    This adds your credentials to the ~/.nx1/profiles file.

Kyuubi batch submit

The Kyuubi batch submit tool supports three authentication methods. If you configure more than one, then NexusOne applies priority in the following order:
  1. Command-line options
  2. YAML config
  3. Environment variable
  4. Interactive prompt

Command-line options

The command-line options authentication method passes authentication values at runtime. The names of the command-line options include:
  • --username: Kyuubi username
  • --password: Kyuubi password
  • --token: Keycloak bearer token
If you provide both --username/--password and --token, then --username/--password takes priority.
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Run the kyuubi_submit.py script and include both options.

YAML config

The YAML config authentication method uses a configuration file. The file contains details about your credentials, including additional details you would normally pass to the command line, such as:
  • Resource
  • Classname
  • Args
  • Jars
The following code shows a full sample of the additional details:
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Create the config file.
  5. Run the Kyuubi script and include the config file.
  6. To optionally override YAML values, pass the options.

Environment variable

The environment variable authentication method uses a variable configured on the command line. It requires the following variable:
  • KYUUBI_SUBMIT_PASSWORD: Kyuubi password
To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Set the environment variable.
  5. Run the Kyuubi script command.

Interactive prompt

The interactive prompt authentication method expects you to always enter your Kyuubi password each time you run a command. To use this option, take the following steps:
  1. Clone the kyuubi-submit GitHub repository.
  2. Install dependencies and requirements.
  3. Make the Kyuubi script executable.
  4. Run the kyuubi_submit.py script without including the --password option.
  5. When prompted to enter a password, enter your password.