Get started #
levv CLI is a command line utility that allows developers and cloud engineers to interact with levv cloud. It runs on your local computer, Linux or Mac OS.
Install levv CLI #
Open a terminal and execute the following command to download and install levv CLI.
curl https://releases.levv.io/install.sh -o install-levv.sh && bash install-levv.sh
Once the process is completed you can verify the installation by executing
levv version
Note: On Mac OS you might experience a refusal to run the application, in that case, you need to manually allow its execution, as explained here.
Login #
To interact with levv cloud you need to authenticate to begin
levv auth login
A welcome message is displayed on success.
Running applications on levv cloud #
Applying a compose file #
Create a compose file to run your application on levv cloud.
# myapp.yaml
services:
website:
image: nginx
deploy:
replicas: 1
Then, to launch your application, run
levv apply -f myapp.yaml
Launching applications from private repository requires uploading your credentials to levv cloud. Learn here how to do it.
Expose them to the internet #
Labeling the corresponding service(s) as public and exposing its HTTP port in the compose specification are the only requirements to access it from the internet.
# myapp.yaml
services:
website:
image: nginx
deploy:
replicas: 1
labels:
io.levv.public: "true"
ports:
- "80:80" # ServicePort:ContainerPort
Assign them the appropriate resources #
You can specify the number of replicas as well as the size for your applications running on levv cloud.
# myapp.yaml
services:
website:
image: nginx
deploy:
replicas: 3
labels:
io.levv.size: "large"
List running applications #
List the applications currently running under your account.
levv ls
Footprint #
levv cloud comes with sustainability in mind. We help you achieving your goals on reducing your carbon footprint.
Get your applications footprint #
Obtain the energy utilization and carbon intensity of your applications. Use the information to assess your digital carbon footprint and trace improvement paths.
levv footprint
Volumes #
Volumes offer local persistent storage for applications running on levv cloud. You can store databases, configurations, user data or any other information that needs to persist after launch or restart.
Create volumes #
Volumes can be created using the levv CLI
levv volumes create
They can also be created when launching applications that attach a new volume.
Attaching volumes #
Volumes can be accessed through a mounting point in your application’s file system.
# myapp.yaml
services:
website:
image: nginx
deploy:
replicas: 1
volumes:
- disk-one:/usr/share/nginx/html
volumes:
disk-one:
When disk-one
does not exist, the levv CLI will request the size to create it before using it.
Volumes can be shared between multiple applications, allowing you to expand their functionality.
# myapp.yaml
services:
website:
image: nginx
deploy:
replicas: 1
volumes:
- disk-one:/usr/share/nginx/html
writer:
image: myrepo/myapp:latest
deploy:
replicas: 1
volumes:
- disk-one:/usr/local/data
volumes:
disk-one:
Object storage #
levv cloud offers object storage buckets that allow you to persist and retrieve unstructured data through the S3 protocol. You can store documents, images, csv files, etc and access them from anywhere.
Create buckets #
Object buckets can be created using the levv CLI.
levv buckets create
After creation, you will be able to manage your buckets using the credentials provided by the levv CLI.
List and manage buckets #
The buckets that you have created can be easily retrieved using the levv CLI
levv buckets ls
Equally, you can obtain a bucket credentials and use them to manage it with an S3 client
levv buckets credentials my-bucket.mycompany.com
We recommend using s5cmd to manage permissions, and store or retrieve data.