Installation for Amazon EKS using Helm#
Time to Complete: 10 minutes
This article details the steps to install the Xsolla Backend engine to an Kubernetes cluster hosted on Amazon Elastic Kubernetes Service using Helm.
Amazon EKS#
Amazon EKS is the preferred way to run Xsolla Backend on AWS:
Prerequisites#
Before you begin make sure that all prerequisites have been installed and configured correctly on the EKS cluster.
Recommendations#
We recommend the following configurations when setting up a Amazon EKS cluster for Xsolla Backend:
At least one EKS cluster node
Minimum EC2
t3.mediuminstance size for Amazon EKS nodesElastic IP for public load balancer
Private S3 bucket for database backup storage
Subscribe to Xsolla Backend#
Before you can deploy Xsolla Backend to Amazon EKS you need to Subscribe to the Xsolla Backend engine on the AWS Marketplace:
Navigate to the AWS Marketplace page
Click the Continue to Subscribe button
Click the Continue to Configuration button
Select the Helm Chart fulfillment option, then click Continue to Launch
Chart Repository#
Xsolla Backend maintains its own Helm repository containing all the official Helm charts. Add the repository with the following commands:
1helm repo add xsolla-backend https://nexus.goxbe.io/repository/xbe-helm/
2helm repo update
Namespaces#
It is recommended that Xsolla Backend be installed within a dedicated namespace within Kubernetes. A namespace can
be created explicitly as shown below or automatically during helm installation using the --create-namespace option:
kubectl create xbe-demo-v1
The above example creates a namespace called xbe-demo-v1. This namespace will contain all of the platform’s
resources.
Install Command#
The helm chart has a number of required properties that must be set in order to install correctly. These are:
Setting |
Description |
Example |
|---|---|---|
|
The title of the product being deployed. |
XBE Demo |
|
The primary domain that the platform will be deployed to. |
|
|
The exact hostname that the platform’s REST API will be served from. |
|
For details on all available configuration options please consult the repository’s README.
Utilizing In-Cluster Database Servers#
The following command will install the Xsolla Backend engine and set up all necessary database servers within the running cluster. This is the RECOMMENDED install method.
1helm upgrade --install xbe-demo-v1 xsolla-backend/xsolla-backend \
2--create-namespace \
3--namespace xbe-demo-v1 \
4--set title=AXR-Demo \
5--set domain=demo.goxbe.cloud \
6--set ingress.hosts[0].host=api.demo.goxbe.cloud/v1
Utilizing External Database Servers#
If external database providers are desired, such as using DocumentDB/RDS/Elasticache when running in AWS, the following command should be used:
1helm upgrade --install xbe-demo-v1 xsolla-backend/xsolla-backend \
2--create-namespace \
3--namespace xbe-demo-v1 \
4--set title=AXR-Demo \
5--set domain=demo.goxbe.cloud \
6--set ingress.hosts[0].host=api.demo.goxbe.cloud/v1 \
7--set mongodb.create=false \
8--set mongodb.url=mongodb://admin:<PASSWORD>@ext.hosted.mongodb \
9--set mongodb.auth.username="admin" \
10--set mongodb.auth.password="<PASSWORD>" \
11--set mongodb.auth.rootPassword="<PASSWORD>"
Utilizing Custom values.yaml#
Sometimes our default configuration is not the most desirable option. In such scenarios you can freely edit the
values.yaml file included in the helm chart repository and deploy using that method instead. Be sure to fill
in any of values marked as Required. Then you can install your cluster with the following simple command:
1helm upgrade --install xbe-demo-v1 xsolla-backend/xsolla-backend \
2--create-namespace \
3--namespace xbe-demo-v1 \
4-f values.yaml
Output#
Once you’ve successfully installed the platform with Helm you will see output from the command like the following:
1NAME: xbe-demo-v1
2LAST DEPLOYED: Thu May 13 12:11:31 2021
3NAMESPACE: xbe-demo-v1
4STATUS: deployed
5REVISION: 1
6NOTES:
7###############################################################################
8# !!!IMPORTANT!!! WRITE DOWN THE FOLLOWING INFORMATION #
9###############################################################################
10Cluster Addresses:
11
12 https://api.demo.goxbe.cloud/v1
13
14Admin Account:
15Username: admin
16Password: <PASSWORD>
17
18Authentication Configuration:
19Audience: demo.goxbe.cloud
20Issuer: api.demo.goxbe.cloud/v1
21ExpiresIn: 1 hour
22Secret: "<SECRET>"
23
24Databases:
25MongoDB:
26 Root Password: <PASSWORD>
27 Username: admin
28 Password: <PASSWORD>
29 URL: mongodb://mongodb
30PostgreSQL:
31 Username: postgres
32 Password: <PASSWORD>
Configuring DNS#
Once Xsolla Backend cluster is created you must configure your DNS server to point to the ingress domain(s) set.
When nginx is setup it creates a Load Balancer resource. This LoadBalancer is what traffic will come in to the cluster to and will be routed to the Xsolla Backend ingress. Therefore, the external IP address of the load balancer is required. You can discover this IP address with the following command:
kubectl -n nginx get svc
This will result in an output like the following:
1NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
2nginx-ingress-nginx-controller LoadBalancer 172.23.207.63 96.46.186.213 80:31246/TCP,443:32541/TCP 204d
3nginx-ingress-nginx-controller-admission ClusterIP 172.23.254.84 <none> 443/TCP 204d
In the above example, the public IP of the LoadBalancer is 96.46.186.213. Now update your DNS for the configure
ingress domains by creating an A record for the domains with this address.
As an example, using the above cluster configuration we must create an A Record DNS entry for the
domain api.demo.goxbe.cloud/v1 to point to IP 96.46.186.213.
Validating the Installation#
To validate that the platform was successfully installed and running correctly you can run kubectl get all on your
cluster. The output should look similar to the following:
kubectl -n xbe-demo-v1 get all
1NAME READY STATUS RESTARTS AGE
2pod/account-services-75f7757b9-j5znc 1/1 Running 0 13h
3pod/achievement-services-ddd975bd7-2zvmk 1/1 Running 0 13h
4pod/xbe-demo-v1-kube-state-metrics-7bb8f78d-24pnp 1/1 Running 0 13h
5pod/xbe-demo-v1-prometheus-server-8bdcb4f8b-tqnqt 2/2 Running 0 13h
6pod/backup-services-855fd94ff8-rfdv8 1/1 Running 0 13h
7pod/db-mongodb-ff99b45b6-624jf 1/1 Running 0 13h
8pod/db-redis-master-0 1/1 Running 0 13h
9pod/db-redis-replicas-0 0/1 Pending 0 13h
10pod/leaderboard-services-7787bf777f-4zkww 1/1 Running 0 13h
11pod/matchmaking-services-dfc5577f9-mv4q4 1/1 Running 0 13h
12pod/notification-services-6f85948cbc-n2wfs 1/1 Running 0 13h
13pod/persona-services-7864cdf6c6-mfmll 1/1 Running 0 13h
14pod/progression-services-dcc848898-z8rqp 1/1 Running 0 13h
15pod/quest-services-6bc67b86bd-xs2f4 1/1 Running 0 13h
16pod/scripting-services-5d8677cf7c-tclds 1/1 Running 0 13h
17pod/server-instance-services-6857f6dbf5-ppl88 1/1 Running 0 13h
18pod/service-monitor-df8d54d9d-rh9qk 1/1 Running 0 13h
19pod/session-services-5b7fbc5b66-6hqc8 1/1 Running 0 13h
20pod/social-services-7ccbcff887-7sdxt 1/1 Running 0 13h
21pod/telemetry-services-5c646dbb96-szz72 1/1 Running 0 13h
22pod/world-services-5666c4dd56-hzq4b 1/1 Running 0 13h
23
24NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
25service/account-services ClusterIP 172.23.51.107 <none> 80/TCP 13h
26service/achievement-services ClusterIP 172.23.17.89 <none> 80/TCP 13h
27service/xbe-demo-v1-kube-state-metrics ClusterIP 172.23.252.168 <none> 8080/TCP 13h
28service/xbe-demo-v1-prometheus-server ClusterIP 172.23.221.250 <none> 80/TCP 13h
29service/backup-services ClusterIP 172.23.58.201 <none> 80/TCP 13h
30service/db-mongodb ClusterIP 172.23.241.71 <none> 27017/TCP 13h
31service/db-redis-headless ClusterIP None <none> 6379/TCP 13h
32service/db-redis-master ClusterIP 172.23.19.37 <none> 6379/TCP 13h
33service/db-redis-replicas ClusterIP 172.23.198.89 <none> 6379/TCP 13h
34service/leaderboard-services ClusterIP 172.23.69.25 <none> 80/TCP 13h
35service/matchmaking-services ClusterIP 172.23.245.237 <none> 80/TCP 13h
36service/notification-services ClusterIP 172.23.109.120 <none> 80/TCP 13h
37service/persona-services ClusterIP 172.23.103.87 <none> 80/TCP 13h
38service/progression-services ClusterIP 172.23.227.87 <none> 80/TCP 13h
39service/quest-services ClusterIP 172.23.110.215 <none> 80/TCP 13h
40service/scripting-services ClusterIP 172.23.12.103 <none> 80/TCP 13h
41service/server-instance-services ClusterIP 172.23.69.222 <none> 80/TCP 13h
42service/service-monitor ClusterIP 172.23.165.42 <none> 80/TCP 13h
43service/session-services ClusterIP 172.23.151.33 <none> 80/TCP 13h
44service/social-services ClusterIP 172.23.190.34 <none> 80/TCP 13h
45service/telemetry-services ClusterIP 172.23.62.122 <none> 80/TCP 13h
46service/world-services ClusterIP 172.23.115.135 <none> 80/TCP 13h
47
48NAME READY UP-TO-DATE AVAILABLE AGE
49deployment.apps/account-services 1/1 1 1 13h
50deployment.apps/achievement-services 1/1 1 1 13h
51deployment.apps/xbe-demo-v1-kube-state-metrics 1/1 1 1 13h
52deployment.apps/xbe-demo-v1-prometheus-server 1/1 1 1 13h
53deployment.apps/backup-services 1/1 1 1 13h
54deployment.apps/db-mongodb 1/1 1 1 13h
55deployment.apps/leaderboard-services 1/1 1 1 13h
56deployment.apps/matchmaking-services 1/1 1 1 13h
57deployment.apps/notification-services 1/1 1 1 13h
58deployment.apps/persona-services 1/1 1 1 13h
59deployment.apps/progression-services 1/1 1 1 13h
60deployment.apps/quest-services 1/1 1 1 13h
61deployment.apps/scripting-services 1/1 1 1 13h
62deployment.apps/server-instance-services 1/1 1 1 13h
63deployment.apps/service-monitor 1/1 1 1 13h
64deployment.apps/session-services 1/1 1 1 13h
65deployment.apps/social-services 1/1 1 1 13h
66deployment.apps/telemetry-services 1/1 1 1 13h
67deployment.apps/world-services 1/1 1 1 13h
68
69NAME DESIRED CURRENT READY AGE
70replicaset.apps/account-services-75f7757b9 1 1 1 13h
71replicaset.apps/achievement-services-ddd975bd7 1 1 1 13h
72replicaset.apps/xbe-demo-v1-kube-state-metrics-7bb8f78d 1 1 1 13h
73replicaset.apps/xbe-demo-v1-prometheus-server-8bdcb4f8b 1 1 1 13h
74replicaset.apps/backup-services-855fd94ff8 1 1 1 13h
75replicaset.apps/db-mongodb-ff99b45b6 1 1 1 13h
76replicaset.apps/leaderboard-services-7787bf777f 1 1 1 13h
77replicaset.apps/matchmaking-services-dfc5577f9 1 1 1 13h
78replicaset.apps/notification-services-6f85948cbc 1 1 1 13h
79replicaset.apps/persona-services-7864cdf6c6 1 1 1 13h
80replicaset.apps/progression-services-dcc848898 1 1 1 13h
81replicaset.apps/quest-services-6bc67b86bd 1 1 1 13h
82replicaset.apps/scripting-services-5d8677cf7c 1 1 1 13h
83replicaset.apps/server-instance-services-6857f6dbf5 1 1 1 13h
84replicaset.apps/service-monitor-57bfcdcbc6 0 0 0 13h
85replicaset.apps/service-monitor-6d4598b578 0 0 0 13h
86replicaset.apps/service-monitor-df8d54d9d 1 1 1 13h
87replicaset.apps/session-services-5b7fbc5b66 1 1 1 13h
88replicaset.apps/social-services-7ccbcff887 1 1 1 13h
89replicaset.apps/telemetry-services-5c646dbb96 1 1 1 13h
90replicaset.apps/world-services-5666c4dd56 1 1 1 13h
91
92NAME READY AGE
93statefulset.apps/db-redis-master 1/1 13h
94statefulset.apps/db-redis-replicas 0/3 13h
Lastly you can check that the platform is correctly responding to API requests using the following test.
The URL is obtained using the Cluster Address reported from the installation command and adding
/status to the end:
curl https://api.demo.goxbe.cloud/v1/status
1{
2 "services": {
3 "account-services": {
4 "lastHeartbeat": "2022-03-11T21:02:35.153Z",
5 "name": "account_services",
6 "online": true,
7 "time": "2022-03-11T21:02:35.152Z",
8 "version": "1.26.0",
9 "lastUpdate": "2022-03-11T21:02:35.153Z"
10 },
11 "achievement-services": {
12 "lastHeartbeat": "2022-03-11T21:02:35.158Z",
13 "name": "achievement_services",
14 "online": true,
15 "time": "2022-03-11T21:02:35.157Z",
16 "version": "1.7.0",
17 "lastUpdate": "2022-03-11T21:02:35.160Z"
18 },
19 "backup-services": {
20 "lastHeartbeat": "2022-03-11T21:02:35.166Z",
21 "name": "backup_services",
22 "online": true,
23 "time": "2022-03-11T21:02:35.166Z",
24 "version": "1.0.0",
25 "lastUpdate": "2022-03-11T21:02:35.166Z"
26 },
27 "leaderboard-services": {
28 "lastHeartbeat": "2022-03-11T21:02:35.171Z",
29 "name": "leaderboard_services",
30 "online": true,
31 "time": "2022-03-11T21:02:35.171Z",
32 "version": "1.9.0",
33 "lastUpdate": "2022-03-11T21:02:35.171Z"
34 },
35 "matchmaking-services": {
36 "lastHeartbeat": "2022-03-11T21:02:35.176Z",
37 "name": "matchmaking_services",
38 "online": true,
39 "time": "2022-03-11T21:02:35.175Z",
40 "version": "1.0.0-rc10",
41 "lastUpdate": "2022-03-11T21:02:35.176Z"
42 },
43 "notification-services": {
44 "lastHeartbeat": "2022-03-11T21:02:35.182Z",
45 "name": "notification_services",
46 "online": true,
47 "time": "2022-03-11T21:02:35.181Z",
48 "version": "1.8.0",
49 "lastUpdate": "2022-03-11T21:02:35.182Z"
50 },
51 "persona-services": {
52 "lastHeartbeat": "2022-03-11T21:02:35.186Z",
53 "name": "persona_services",
54 "online": true,
55 "time": "2022-03-11T21:02:35.186Z",
56 "version": "1.10.0",
57 "lastUpdate": "2022-03-11T21:02:35.186Z"
58 },
59 "progression-services": {
60 "lastHeartbeat": "2022-03-11T21:02:35.191Z",
61 "name": "progression_services",
62 "online": true,
63 "time": "2022-03-11T21:02:35.190Z",
64 "version": "1.6.0",
65 "lastUpdate": "2022-03-11T21:02:35.191Z"
66 },
67 "quest-services": {
68 "lastHeartbeat": "2022-03-11T21:02:35.195Z",
69 "name": "quest_services",
70 "online": true,
71 "time": "2022-03-11T21:02:35.195Z",
72 "version": "1.6.0",
73 "lastUpdate": "2022-03-11T21:02:35.195Z"
74 },
75 "scripting-services": {
76 "lastHeartbeat": "2022-03-11T21:02:35.200Z",
77 "name": "scripting_services",
78 "online": true,
79 "time": "2022-03-11T21:02:35.200Z",
80 "version": "1.8.0",
81 "lastUpdate": "2022-03-11T21:02:35.200Z"
82 },
83 "server-instance-services": {
84 "lastHeartbeat": "2022-03-11T21:02:35.208Z",
85 "name": "server_instance_services",
86 "online": true,
87 "time": "2022-03-11T21:02:35.207Z",
88 "version": "1.8.0",
89 "lastUpdate": "2022-03-11T21:02:35.208Z"
90 },
91 "session-services": {
92 "lastHeartbeat": "2022-03-11T21:02:35.214Z",
93 "name": "session_services",
94 "online": true,
95 "time": "2022-03-11T21:02:35.214Z",
96 "version": "1.9.0",
97 "lastUpdate": "2022-03-11T21:02:35.214Z"
98 },
99 "social-services": {
100 "lastHeartbeat": "2022-03-11T21:02:35.220Z",
101 "name": "social_services",
102 "online": true,
103 "time": "2022-03-11T21:02:35.219Z",
104 "version": "1.6.0",
105 "lastUpdate": "2022-03-11T21:02:35.220Z"
106 },
107 "telemetry-services": {
108 "lastHeartbeat": "2022-03-11T21:02:35.229Z",
109 "name": "telemetry_services",
110 "online": true,
111 "time": "2022-03-11T21:02:35.228Z",
112 "version": "1.8.0",
113 "lastUpdate": "2022-03-11T21:02:35.229Z"
114 },
115 "world-services": {
116 "lastHeartbeat": "2022-03-11T21:02:35.235Z",
117 "name": "world_services",
118 "online": true,
119 "time": "2022-03-11T21:02:35.234Z",
120 "version": "1.14.0",
121 "lastUpdate": "2022-03-11T21:02:35.235Z"
122 }
123 },
124 "healthy": 15,
125 "offline": 0,
126 "total": 15
127}
Additional Support#
Xsolla Backend offers free support via Discord - join now!