Get Started¶
It’s easy to get started running CloudSlang flows, especially using the CLI and ready-made content.
Download, Unzip and Run¶
- Download the CLI with content zip file.
- Unzip the archive.
- Run the CloudSlang executable in the
cslang-cli/bin
folder. - At the prompt enter:
run --f ../content/io/cloudslang/base/print/print_text.sl --i text=Hi
- The CLI will run the ready-made
print_text
operation that will print the value passed to the variabletext
to the screen.
Set up python for CloudSlang cli¶
To use an external python in cloudslang-cli, set the use.jython.expressions
property to false
in cslang-cli/configuration/cslang.properties
.
Important
By default, the property use.jython.expressions=true
is set to true
pointing to use Jython.
Unzip the downloaded python 3.8.7 package to any directory. Notice the python-3.8.7 folder after unzipping.
Navigate to cslang-cli/configuration and open the cslang.properties file using any text editor.
Specify a property
python.path
to point it to the following locations based on your Operating System:- Windows: <unzipped_location>/python-3.8.7
- Linux: <unzipped_location>/python-3.8.7/bin
Additionally for Linux environment, perform the following steps to grant permissions:
Open the terminal shell at /python-3.8.7/bin folder, and then run the following command:
ln -sf python3 python
Navigate back to /python-3.8.7 folder, and then run the following command. The permission to access the folder is granted.
chmod -R 755 bin
Docker¶
There are two CloudSlang Docker images. One (cloudslang/cloudslang) is a lightweight image meant to get you running CloudSlang flows as quickly as possible. The other image (cloudslang/cloudslang-dev) adds the tools necessary to develop CloudSlang flows.
This image includes:
- Java
- CloudSlang CLI
- CloudSlang content
To get and run the image: docker pull cloudslang/cloudslang
To run a flow with a CloudSlang prompt:
docker run -it cloudslang/cloudslang
- At the prompt enter:
run --f ../content/io/cloudslang/base/print/print_text.sl --i text=Hi
Or, to run the flow without the prompt:
docker run --rm cloudslang/cloudslang run --f ../content/io/cloudslang/base/print/print_text.sl --i text=first_flow
The CLI will run the ready-made print_text
operation that will
print the value passed to the variable text
to the screen.
This image includes:
- Java
- CloudSlang CLI
- CloudSlang content
- Python
- Pip
- Vim
- Emacs
- SSH
- Git
- Atom
- language-cloudslang Atom package
To get the image: docker pull cloudslang/cloudslang-dev
Next Steps¶
Now that you’ve run your first CloudSlang file, you might want to:
- Watch a video lesson on how to author CloudSlang content using Atom.
- Learn how to write a print operation yourself using the Hello World example.
- Learn about the language features using the New Hire Tutorial.
- Learn about the language in detail using the CloudSlang Reference.
- See an overview of the ready-made content.
- Learn about the ready-made content.
- Learn about embedding CloudSlang or the CloudSlang Orchestration Engine into your existing application.
- Learn about the architecture of CloudSlang and the CloudSlang Orchestration Engine.