Document updated on Feb 2, 2020
KrakenD Enterprise Installation Guide
KrakenD Enterprise is delivered in several formats, including Docker, Linux packages (deb, rpm) and generic installation options.
Pre-requisites
Part of the private content you will need to run KrakenD Enterprise is stored in AWS or Azure. It doesn’t mean that you need to work with any of these two providers in production, they purely serve us as a hosting solution for our files and artifacts.
Installation using AWS CLI
You need to install the AWS CLI in your development machine (not the final KrakenD server)
The AWS credentials that you received by email need to be stored under ~/.aws/credentials
. The file might looks like this (fake credentials below):
[default]
aws_access_key_id = AKIAQYWA47SCCDSQLWAN
aws_secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If you already have credentials, add another named profile.
Installation using Azure CLI
For installations on Azure platform:
- Install Azure CLI
- Login to Azure with
az login
- When the browser opens, use the credentials you have received from KrakenD
Docker
If you are already familiar with Docker, the easiest way to get started is by pulling our KrakenD image from Azure or AWS. As the repositories are private, you need to provide the credentials we sent.
From Amazon ECR
To pull our Docker image from AWS, you need to:
- Install the AWS CLI and add the credentials we provided
- Login to ECR
- Pull the container
- Push it to your registry
Login to ECR
Depending on which version of the AWS CLI you have installed you might need one of these two commands:
AWS CLI v2:
Login to ECR with AWS CLI v2
$aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin \
052351007912.dkr.ecr.us-east-1.amazonaws.com
AWS CLI v1:
Login to ECR with AWS CLI v1
$$(aws ecr get-login --region us-east-1 --no-include-email)
Pull the image and push to your registry
Running KrakenD using the Docker container
$docker pull krakend/krakend-ee:2.0
If you have a corporate Docker registry you might want to push the image locally:
Running KrakenD using the Docker container
$docker tag krakend/krakend-ee:2.0 youregistry.com/krakend-ee:v2.0
docker push youregistry.com/krakend-ee:v2.0
From Azure Container Registry
To pull our Docker image from Azure, you need to:
- Install Azure CLI
az acr login --name krakend
docker pull krakend.azurecr.io/krakend-ee:v2.0
After these commands you will have in your local computer the krakend enterprise container. You can push it to your own ACR or use it locally.
Mac installation
The Mac installation requires downloading a zipped package and uncompressing its content. Your Macintosh should be relatively new, using an M1 processor (ARM64).
With the AWS credentials provided by krakend, make a folder under /opt/krakend
and download the package:
Download the package
$mkdir krakend
cd krakend
aws s3 cp s3://download.enterprise.krakend.io/bin/krakend-ee_2.0.3_osx-arm64.tar.gz .
And then uncompress it and move it to a location of your choice, e.g.:
Uncompress the file
$tar xvfz krakend-ee_2.0.3_osx-arm64.tar.gz
Uncompressing produces two items:
- The
krakend
binary - The
plugins
folder.
You can move the krakend
binary to /usr/local/bin
to have it available anywhere (or somewhere else under your $PATH
):
Move krakend to PATH
$sudo mv krakend /usr/local/bin/krakend
By default, KrakenD documentation locates plugins under /opt/krakend/plugins
but you can leave them where they are or use any other location as long as you specify the path on the configuration. If you want to use the defaults:
Move krakend to PATH
$sudo mkdir -p /opt/krakend
sudo mv plugins /opt/krakend/
Linux installation (without Docker)
The installation process requires going through these steps:
- Copy the
LICENSE
andLICENSE.key
to the server - Download and copy the certificate chain
- Setup the KrakenD repository
- Install KrakenD
- Start the KrakenD service
Download the certificate and copy your license
Once the AWS CLI is installed and configured with the credentials we provided by email, the first step to all Linux flavours is to download the certicate chain from our repository. :
Downloading the CA chain
$aws s3 cp s3://download.enterprise.krakend.io/krakend-ca-chain.pem .
Now copy the certificate and licenses to the server. Replace user@yourserver
with your actual username and IP address:
ssh user@yourserver mkdir -p /etc/krakend/
scp krakend-ca-chain.pem user@yourserver:/etc/krakend/krakend-ca-chain.pem
scp LICENSE user@yourserver:/etc/krakend/LICENSE
scp LICENSE.key user@yourserver:/etc/krakend/LICENSE.key
Debian and Ubuntu (apt)
SSH in the machine and create a config file in /etc/apt/apt.conf.d/99krakend
with this content:
cat << EOF > /etc/apt/apt.conf.d/99krakend
Acquire::https::repo.enterprise.krakend.io {
CaInfo "/etc/krakend/krakend-ca-chain.pem";
SslCert "/etc/krakend/LICENSE";
SslKey "/etc/krakend/LICENSE.key";
};
EOF
Make sure the three files LICENSE
, LICENSE.key
, and krakend-ca-chain.pem
exist in /etc/krakend
.
Run the following commands:
apt-get install -y gnupg ca-certificates
apt-key adv --keyserver keyserver.ubuntu.com --recv 5DE6FD698AD6FDD2
echo "deb https://repo.enterprise.krakend.io/apt stable main" | tee /etc/apt/sources.list.d/krakend-ee.list
apt-get update
apt-get install -y krakend-ee
Now the krakend
command is available in the system.
KrakenD should run on old systems too, at least from Debian 8 and Ubuntu 16.x
CentOS, Oracle Linux, and Redhat (yum)
The RPM file can be downloaded from here:
aws s3 cp s3://download.enterprise.krakend.io/krakend-ee-repo-1.0-2.x86_64.rpm .
Make sure the three files LICENSE
, LICENSE.key
, and krakend-ca-chain.pem
exist in /etc/krakend
.
Then install and start the latest version of KrakenD with:
rpm -Uvh krakend-ee-repo-1.0-2.x86_64.rpm
yum install krakend-ee
systemctl start krakend-ee
Manual Linux install
You can also download a tar.gz
and decompress it anywhere. Instructions to check the SHA and PGP signature here
Download:
aws s3 cp s3://download.enterprise.krakend.io/bin/krakend-ee_v2.0_amd64.tar.gz .
aws s3 cp s3://download.enterprise.krakend.io/bin/krakend-ee_v2.0_amd64.tar.gz.sha256 .
aws s3 cp s3://download.enterprise.krakend.io/bin/krakend-ee_v2.0_amd64.tar.gz.asc .
Uncompress:
tar xvfz krakend-ee_v2.0_amd64.tar.gz
Once you have downloaded the binary, you should move the contents to each folder. You will need root permissions or add sudo
to some of these commands:
mv usr/bin/krakend /usr/local/bin/krakend
mkdir -p /opt/krakend/
mv plugins /opt/krakend
chmod +x /usr/local/bin/krakend
Now you can type krakend
.
To stop KrakenD graceful use any of these two commands:
killall -s SIGTERM krakend
killall -s SIGINT krakend
