Installing a Phalanx environment#
Each separate installation of Phalanx is called an environment. An environment has a hostname, Vault server and path to its secrets, and a set of Phalanx applications that should be installed in that environment.
Creating an environment#
To create a new Phalanx environment, take the following steps:
Fork the Phalanx repository if this work is separate from the SQuaRE-managed environments.
Create a new
values-environment.yaml
file in environments. Start with a template copied from an existing environment that’s similar to the new environment. Edit it so thatname
,fqdn
,vaultUrl
, andvaultPathPrefix
at the top match your new environment. (See Set up secrets management for more information about the latter two settings.) Enable the applications this environment should include.Decide on your approach to TLS certificates. See Hostnames and TLS for more details. This may require DNS configuration in Route 53 if this is the first deployment in a new domain and you are using Let’s Encrypt for certificates.
Do what DNS setup you can. If you already know the IP address where your instance will reside, create the DNS records (A or possibly CNAME) for that instance. If you are using a cloud provider or something like minikube where the IP address is not yet known, then you will need to create that record once the top-level ingress is created and has an external IP address.
Decide on your approach to user home directory storage. The Notebook Aspect (the
nublado
application) requires a POSIX file system. The most frequently used method of providing that file system is NFS mounts, but you may instead want to use persistent volume claims or a different file system that’s mounted on the Kubernetes cluster nodes and exposed to pods viahostPath
. Whatever storage you choose, you will need to configure appropriate mount points innublado
when you configure each application in the next step.For each enabled application, create a corresponding
values-environment.yaml
file in the relevant directory under applications. Customization will vary from application to application. The following applications have special bootstrapping considerations:Add the URL of your new environment to
docs/documenteer.toml
underphinx.linkcheck.ignore
. The Argo CD URL of your environment will be unreachable, so you need to tell Sphinx valid link checking to ignore it.Generate the secrets for the new environment and store them in Vault with installer/update_secrets.sh. You will need the write key for the Vault enclave you are using for this environment. If you are using 1Password as a source of secrets, you will also need the access token for the 1Password Connect server. (For SQuaRE-managed deployments, this is in the
SQuaRE Integration Access Token: Argo
1Password item in the SQuaRE vault.)
Installing Phalanx#
Once you have defined a Phalanx environment, follow these steps to install it. These can be run repeatedly to reinstall Phalanx over an existing deployment.
Create a virtual environment with the tools you will need from the installer’s requirements.txt.
Run the installer script at installer/install.sh. Debug any problems. The most common source of problems are errors or missing configuration in the
values-environment.yaml
files you created for each application.If the installation is using a dynamically-assigned IP address, while the installer is running, wait until the ingress-nginx-controller service comes up and has an external IP address. Then, set the A record for your endpoint to that address (or set an A record with that IP address for the ingress and a CNAME from the endpoint to the A record). For installations that are intended to be long-lived, it is worth capturing this IP address at this point and modifying the
ingress-nginx
configuration to use it statically should you ever need to reinstall the instance.