Installation
This section guides you through setting up your Shoc Platform environment, from account creation to installing the Shoc Command Line Interface (CLI).
Account and Workspace Setup
Before you can start using Shoc Platform, you’ll need an account and a workspace.
-
Create an Account or Log In:
- If you’re a new user, navigate to the Shoc Platform website and sign up for a new account.
- If you already have an account, simply log in using your existing credentials.
-
Create a Workspace or Accept Invitation:
- For New Workspaces: After logging in, you can create a new workspace. You can choose to create an Individual workspace for personal projects or an Organization workspace for team collaboration.
- For Invited Users: If you’ve been invited to an existing workspace, accept the invitation to gain access to its resources and projects.
Installing the Shoc CLI
The Shoc CLI is your primary interface for interacting with the Shoc Platform, allowing you to manage jobs, clusters, and more directly from your terminal. Installation is done using npm, so ensure you have the necessary prerequisites installed.
Prerequisites
- Node.js: Shoc CLI requires Node.js to be installed on your system. You can download and install the latest stable version from the official Node.js website (https://nodejs.org/ ).
- libsecret (Linux Only): If you are running Linux, you will need to install
libsecret
for secure credential storage. The installation method varies depending on your Linux distribution:- Debian/Ubuntu:
sudo apt-get install libsecret-1-0
- CentOS/RHEL/Fedora:
sudo yum install libsecret # or sudo dnf install libsecret
- Debian/Ubuntu:
Install Shoc CLI
Once the prerequisites are met, you can install the Shoc CLI globally using npm:
npm i -g @shoc/shoc
Configuration
After installing the Shoc CLI, you’ll need to perform a brief first-time configuration.
Initialize Configuration
Run the following command to initialize the Shoc CLI configuration:
shoc config init
This command will prompt you to enter a default workspace name. This is the workspace the CLI will use by default for your commands.
Log in to Shoc Platform
Finally, log in to your Shoc Platform account via the CLI. This will link your local CLI installation to your Shoc Platform account.
shoc auth login
Upon executing this command, your default web browser will automatically open to a Shoc Platform authorization page. Complete the login process in your browser. Once authorization is successful, you can close the browser tab and return to your terminal. You are now ready to use the Shoc CLI!