Install clustered On-premise version of Bugsnag using CloudFormation.
To get started with your Bugsnag On-premise installation, you’ll need the following things prepared in advance:
Installation can be done either through the CloudFormation UI or through the AWS CLI, see below for more information.
Installation will take some time to apply, usually around 20-25 minutes as this sets up a Kubernetes cluster, nodes, load balancers, ECR repositories, and an EC2 instance. so everything is ready for running Bugsnag.
Apply the CloudFormation template through the AWS console using the following template URL:
https://s3.amazonaws.com/bugsnag-onprem-public/cloudformation/latest/bugsnag-onprem-eks.yaml
and enter the parameters listed on the page.
Run the following:
aws cloudformation create-stack \
--stack-name bugsnag-onprem \
--capabilities CAPABILITY_IAM \
--template-url https://bugsnag-onprem-public.s3.amazonaws.com/cloudformation/latest/bugsnag-onprem-eks.yaml \
--role-arn arn:aws:iam::90000:role/bugsnag-onprem-execution-role \
--parameters \
ParameterKey=ExecutionRole,ParameterValue=arn:aws:iam::90000:role/bugsnag-onprem-execution-role \
ParameterKey=ClusterName,ParameterValue=bugsnag-onprem-1 \
ParameterKey=NodeImageId,ParameterValue=ami-1234567890abcdef1 \
ParameterKey=KeyName,ParameterValue=bugsnag-onprem-key \
ParameterKey=HostedZoneId,ParameterValue=ABC123DEF456 \
ParameterKey=EventServerHostname,ParameterValue=bugsnag-notify.example.com \
ParameterKey=EventServerCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=GrafanaHostname,ParameterValue=bugsnag-grafana.example.com \
ParameterKey=GrafanaCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=HooksServerHostname,ParameterValue=bugsnag-hooks.example.com \
ParameterKey=HooksServerCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=DashboardHostname,ParameterValue=bugsnag-dashboard.example.com \
ParameterKey=DashboardCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=ReleaseServerHostname,ParameterValue=bugsnag-build.example.com \
ParameterKey=ReleaseServerCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=SessionServerHostname,ParameterValue=bugsnag-sessions.example.com \
ParameterKey=SessionServerCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=UploadServerHostname,ParameterValue=bugsnag-upload.example.com \
ParameterKey=UploadServerCertificateArn,ParameterValue=arn:aws:acm:us-west-1:90000:certificate/00000000-cccc-5555-9999-dddddddddddd \
ParameterKey=ConfigServerSecurityGroup,ParameterValue=sg-12ab34cd \
ParameterKey=ConfigServerSubnetID,ParameterValue=subnet-12ab34cd \
ParameterKey=ConfigServerKeyName,ParameterValue=config-server-key \
ParameterKey=ConfigServerImageId,ParameterValue=ami-1234567890abcdef1 \
ParameterKey=ECRRepositoryNamespace,ParameterValue=namespace
For NodeImageId
, see https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html for more information about the AMI to use.
For ConfigServerImageId
see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html for more information about the AMI to use.
Once the stack has finished creating, the template will create a dedicated Config Server for managing installations and upgrades that has all the tools required for getting Bugsnag setup. Connect to that instance for the next steps.
Before you can initialize Bugsnag, you will need to do the following steps.
First you will need to configure the AWS CLI to have access to the ECR repository and EKS Kubernetes cluster, you can do this by running:
aws configure
You will also need to configure kubectl
to have the correct config to interact with the Kubernetes cluster, this can be done by running:
aws eks --region region update-kubeconfig --name cluster_name --role-arn role_arn
The cluster name and role ARN (execution role ARN in the template) is something you specified in the template.
To get the credentials required by the installer for pushing the images to your ECR docker registry, you should also run
aws ecr get-login --no-include-email
Run the following to initialize Bugsnag On-premise using Replicated Ship configuration tool. Make sure to run this command from a sensible directory as the tool will store configuration under .ship
folder in the current directory. This will contain the state of your installation including the configuration and therefore should be backed up.
docker pull replicated/ship && \
docker run -it -p 8800:8800 --rm -v `pwd`:/out \
-v /var/run/docker.sock:/var/run/docker.sock \
-e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \
replicated/ship init \
"replicated.app/bugsnag-clustered"
You will be asked to enter your Bugsnag On-premise license. Enter the license you received from Bugsnag to continue to the next step.
The configuration tool will be available at http://INSTANCE_IP:8800
.
Follow the steps in the configuration tool and configure your installation as directed on the settings page. When configuring the registry you can use the registry setup by the CloudFormation template, the registry address will be an output of the CloudFormation stack.
Once configured the next step will push all of the required images to your Docker registry and generate a bugsnag-kubernetes.yaml
file in your current directory with instructions on how to apply that to start Bugsnag.
It can take several minutes for Bugsnag On-premise to fully start up.
Now Bugsnag is running, you should be able to access the Bugsnag dashboard, where you’ll need to create your account and first project.
Visit your Bugsnag dashboard in a web browser (available by default at the address you specified in the CloudFormation template) to set up your account and create projects for each of the applications you wish to monitor.
Once you have created your account and first project you will need to configure your applications to send errors and sessions information to your Bugsnag instance instead of notify.bugsnag.com and sessions.bugsnag.com respectively. Follow the instructions on configuring platform notifiers for how to do this.