Getting Started
You will first need to install a container runtime as the L7|ESP software is distributed as an OCI-compliant container image.
Container Runtime
A tool designed to make it easier to run container image(s) so you can focus on development, testing and deploying content to L7|ESP.
The L7|ESP SDK is delivered as a container image, and contains the following tools:
The entire L7|ESP server software suite is at your fingertips. Create local or remote environments for development in just a few minutes.
Software version control system used collaboration and change tracking between developers who are working on the same L7|ESP SDK project in parallel.
Python distribution and language-agnostic package manager used when writing custom pipeline scripts and integrations throughout development.
IT automation tool used to prevent configuration drift when installing the same content or customizations to different L7|ESP environments.
Project Directory
An L7|ESP SDK project is a directory that contains all managed content and configuration for a given L7|ESP site and all it’s DTAP environments.
If you received a deployment bundle, you can use tar
to extract the project directory:
$ tar xf deployment.tar.gz
To create a new L7|ESP SDK project, you can use cruft
to copy a template repository:
$ pipx run cruft create git@bitbucket.org:lab7io/customerrepo_template.git
To clone an existing L7|ESP SDK project, you can use git
to clone the repository:
$ git clone git@bitbucket.org:lab7io/acme.git
Note
The latter commands require access to L7 Informatics’ Bitbucket account.
Throughout this documentation, we’ll refer to an acme
project in examples. ACME Corp is a fictitious project used during product testing and, therefore, does not represent a real entity.
Start Application
Typically, the server, the web UI, and the Python client will be included as a part of the L7|ESP SDK image.
Docker Compose
Most L7|ESP SDK projects use Docker’s Compose plugin to manage container life-cycle. Compose is a tool for managing container configuration in a single file called docker-compose.yml
.
Confirm Version
It’s highly recommended that you ensure you are using the latest L7|ESP SDK image at any time, so you have the latest L7|ESP patches (security or otherwise).
You can confirm this by checking the first line in Dockerfile
:
$ docker compose config | grep image
image: l7esp/server:3.0.0-sdk.N
Start
Once you’ve installed all prerequisites and requirements for using the L7|ESP SDK, you can start a local instance of the application using Docker Compose:
$ docker compose up --detach
This task will take a few minuntes while it pulls the L7|ESP SDK container image and creates a running L7|ESP SDK container for you to develop in. If you run into any issues, please contact L7 Informatics’ Support.
After provisioning, you’ll have a running L7|ESP instance that you can develop content for locally. For more information on configuring your application and creating content definitions, see the Development section of the documentation. For an in-depth example of creating content using the L7|ESP SDK, see the Tutorial section.
You may also check the container logs to see if there are any errors:
$ docker compose logs --follow
Note
Press Ctrl+C
to exit the container logs.
Shell
After starting the project, you’ll need to enter the L7|ESP SDK container’s shell to do development and testing. All necessary tools are installed inside to container to simplify the process of getting started with the L7|ESP SDK.
To get a shell into the L7|ESP SDK container image, you can do the following:
$ # get a shell into the container
$ docker compose exec server bash
Note
At this point, you should have a Bash prompt inside the container, instead of your host machine.
Installation
Now, to install L7|ESP SDK project inside the L7|ESP SDK container running on your machine, run:
$ make install
Virtual Environments
To perform certain tasks, you may need to switch Python virtual environments. For example, when doing pipeline script development, it is often useful to enable the Python virtual environment containing the L7|ESP Python client:
$ source ~/data/extensions/client/bin/activate
Note
Once you’re finished using a virtualenv, you can deactivate the environment by running the deactivate
command.
For more information on the virtualenv
Python program, see the documentation section.