Content Installation
The sections below provide details on mechanisms for creating bundles and deploying content created with the L7|ESP SDK. After reading this documentation, you’ll understand how production bundles of L7|ESP are built and how to install a production bundle in either an existing Linux server or inside of a container.
Deployment Bundle
For deploying the application in production, L7 provides an application bundle that contains specific versions of L7|ESP and related tools, along with all content that customers have defined in their L7|ESP SDK. These bundles must be generated on request by L7, and once created, can be used to install L7|ESP and custom content on a production system.
Deployment bundles are structured in a way that mirrors the L7|ESP SDK structure, since a lot of the commands for installing the bundle in production are the same as those that install the bundle in the development VM. Generally, the only differences between the L7|ESP SDK structure and the deployment bundle structure are a few boilerplate files (the README.md
, Makefile
, and the docs/
folder).
Installation
Requirements
The deployment bundle must be installed on one of the following Linux-based operating systems:
Ubuntu 20.04+
RHEL/CentOS 7+
Aside from the operating system, the only additional requirement is make, which comes by default on most Linux-based operating systems.
Install
After extracting this package, you can use the Makefile to install L7|ESP and all custom content created for this deployment:
~$ tar -zxvf <package-name>.tar.gz ~$ cd <package-name> ~$ make install
This command will prompt for several configuration settings (hit <enter> to use defaults) and then proceed to install L7|ESP and import all custom content.
You can check the status of the installation at any time by running:
~$ make status L7|ESP web server : Available L7|ESP system services : Available L7|ESP database : Available
Update
To update an existing installation with a new L7|ESP bundle or related software/content, you can use a similar process as the install process. However, instead of make install
, you’ll use make update
to perform the update:
~$ tar -zxvf <package-name>.tar.gz ~$ cd <package-name> ~$ make update
This command will run through a lot of the same tasks as make install
, but will preserve the database state and also perform any necessary database migrations for the update process.
Administration
Reload
If at any point you need to reload the application after install (i.e. if the application gets into a strange state or if you’ve rebooted the server), you can run:
~$ make reload
This command will take down the instance (if it’s running) and reload the L7|ESP service (including all related web, logging, and pipeline services).
Import
If at any point you’ve deleted your database and need to re-import content defined in the customer bundle, you can run:
~$ make import
All of the content that you’ve defined as part of your production configuration will be loaded.
Database
Reset
If at any point you need to reset the application after install (i.e. completely wipe the application database), you can run:
~$ make reset
This command will take down the instance (if it’s running), remove the database, re-run database migrations and setup, and reload the L7|ESP service (including all related web, logging, and pipeline services).
Note
Please be careful when resetting a production database. All data will be lost. If you set db_archive: true
in your production playbook, the database will always be backed up in a folder called archive
in the application install directory.
Archive
To create a backup of the application database (including all content and data created by the application), you can run:
~$ make archive
This command will create a .sql file (in a folder called archive inside of the application install directory) containing a database dump from the application.
Other Commands
Below are the list of available commands in the deployment bundle’s Makefile:
~$ make help info list info about package init install prerequisites install provision production instance update update existing esp installation with ansible reset reset database with ansible tasks archive backup/archive esp database stop stop running esp instance reload reload or start application import import bundled content with ansible status check status of running esp instance