Installation
Learn how to install ST4SD on a variety of platforms
- Set Up Local Client
- Install on OpenShift Local
- Install on Kubernetes and OpenShift
- Install on Classic HPC
Set Up Local Client
The local client install only requires st4sd-runtime-core
. You can install
st4sd-runtime-core
directly on your laptop using pip
.
Requirements
python3
- We recommend that you use python 3.9 although versions 3.7 through 3.10 should work.
Installing
A simple pip install suffices:
pip install "st4sd-runtime-core[develop]"
Install on OpenShift Local
Requirements
You can deploy a small scale version of ST4SD Cloud on your personal device using Red Hat OpenShift Local. To get started with Red Hat OpenShift Local, download the “OpenShift Local” binary (crc) from the Red Hat Console website.
One time Setup
After you install OpenShift Local you will get access to the crc
binary.
Ensure the crc
binary is in your ${PATH}
for example when you run
crc version
in your terminal you get similar output to:
CRC version: 2.22.1+e8068b4OpenShift version: 4.13.3Podman version: 4.4.4
Below we use crc
in a script to:
- create and configure the Virtual Machine that will host OpenShift Local
- Set the password of the kubeadmin account to
fun
- do not use insecure passwords in production. - Deploy ST4SD Cloud on the
st4sd-local
namespace - Wait for the ST4SD microservices to go online
- Open a browser to visit your instance of the Registry UI!
- Login as the user
developer
with the passworddeveloper
- this is the default non-admin user thatcrc
creates for you.
- Login as the user
Copy the text below and execute it in your terminal:
cat <<'EOF'>one_time_setup.shset -ecrc config set consent-telemetry nocrc setup# Increase default resource limits for the Virtual Machinecrc config set cpus 8crc config set memory 14336crc config set disk-size 50# Set the password to "fun" - do not use insecure passwords in production
The script will take 5-15 minutes to complete. While it is building your local ST4SD Cloud deployment, consider exploring the ST4SD Services and ST4SD Registry webpages. You can use the information in there to populate your catalog of experiments and more!
Continue reading if you would like to get more information about the individual steps above.
Setting up your Virtual Machine for OpenShift Local
Red Hat OpenShift Local runs as a Virtual Machine on your device. There is a
one-time setup that you need to do using the crc
command-line utility that you
downloaded in the above step. The default installation of OpenShift Local
produces a local OpenShift cluster with:
- 4 virtual CPU cores,
- 9 GB of RAM, and
- 31 GB of storage space
We recommend increasing the defaults with the following:
# one time commandcrc setup# if OpenShift Local is already running, execute "crc stop" firstcrc config set cpus 8crc config set memory 14336crc config set disk-size 50
Below we also change the default password for the kubeadmin so that the instructions are easier to follow.
# Set the password to "fun" - do not use insecure passwords in productioncrc config kubeadmin-password fun
If you ever want to view the credentials for accessing your OpenShift Local instance, you can run
crc console --credentials
Starting and Stopping the OpenShift Local Virtual Machine
Recall that OpenShift Local runs as a small scale Virtual Machine on your personal device. We recommend starting it before you experiment with ST4SD and stopping it when you are done running experiments to release the compute resources that the Virtual Machine is taking up.
To start the virtual machine type:
crc start# Use the `oc` command line interfaceeval $(cr oc-env)# Open a browser to login to OpenShift Web Consolecrc console
To stop the virtual machine type:
crc stop
Installing ST4SD Cloud
When crc start
finishes printing information on the terminal, your OpenShift
Local cluster has started running. You may now connect using the
# Use the `oc` command line interfaceeval $(crc oc-env)# Ask crc to print the `oc login` commands for youcrc console --credentials# Now login as the kubeadmin, recall that we set the password to "fun"oc login -u kubeadmin -p fun https://api.crc.testing:6443# Open a browser to login to OpenShift Web Consolecrc console
Installing
After your OpenShift Local is up and running (i.e. crc start
has finished).
Follow the instructions on your terminal to login in as an administrator into
OpenShift.
- Run
crc console --credentials
to see theoc login
commands you can type in your terminal. - Create the project
st4sd-local
:oc new-project st4sd-local
. - Deploy the minimal version of ST4SD:
oc apply -f https://raw.githubusercontent.com/st4sd/st4sd-deployment/main/manifests/openshift-local-minimal-release.yaml
. - The url to your local instance of ST4SD is https://local.apps-crc.testing
- You can access your local ST4SD registry-ui at https://local.apps-crc.testing/registry-ui/
- The very first time you login, OpenShift will inform you that ST4SD wishes to know that you are an authorized user of the system. Accept the OpenShift prompt on your browser.
- Both default OpenShift accounts (
developer
andkubeadmin
will have access to your ST4SD microservices).- By default, the
developer
account has the passworddeveloper
. - You can print the administrator credentials using
crc console --credentials
.
- By default, the
Install on Kubernetes and OpenShift
First, add the Simulation Toolkit for Scientific Discovery (ST4SD) operator to the Operator Catalog of your OpenShift cluster:
oc apply -f https://raw.githubusercontent.com/st4sd/st4sd-olm/main/examples/deploy.yaml
Then follow our instructions to configure and install. For comprehensive details on customizing ST4SD deployments
using helm
post-installation see https://github.com/st4sd/st4sd-deployment.
Install on Classic HPC
Requirements
The following installation instructions assume you have
- Internet access
- swig is in your $PATH
- swig is a program for creating scripting language wrappers. Required for building the LSF wrappers
- python3 (3.7 to 3.10) is in your $PATH
- The command
tox
is available- Check by typing
tox
and pressing return
- Check by typing
Installing
- Clone the ST4SD runtime core repository
- run
git clone https://github.com/st4sd/st4sd-runtime-core.git
- run
cd
into the cloned repository- run
DEPLOY_VENV=$MYVENV tox -e py37-deploy-lsf --site-packages
where$MYVENV
is where you want the virtual environment to be created
Learn more
User management
Manage the access permissions of users in your ST4SD Cloud instance using standard Kubernetes mechanisms.
Exploring the Registry UI
Install successful? You can now learn about all the features of our web interface for browsing and examining virtual experiments packages and runs.
Use the APIs
Learn how to use the ST4SD python client API to run, query, and interact with virtual experiments. The APIs also offer access to a trove of experiment metadata and files such as logs and outputs. You can find more examples in our Jupyter Notebooks example repository.