Before proceeding make sure to have these software packages installed on your machine:
- Docker Desktop: Install latest version of Docker Desktop on your OS
Navigate to the root of the fuel-core git repo and run at your command line:
docker-compose up -d
This will start the fuel-core container in the background and keep it running.
In order to stop and remove the fuel-core container, run at your command line:
docker-compose down
Note: Linux, Unix, and Windows operating systems are supported for docker-compose deployment option.
In order to deploy Fuel Client on k8s you must:
- Deploy fuel-core helm chart to your k8s cluster
Before proceeding make sure to have these software packages installed on your machine:
-
Helm: Install latest version of Helm3 for your OS
-
Terraform: Install latest version of Terraform for your OS
-
kubectl: Install latest version of kubectl
-
gettext: Install gettext for your OS
-
AWS (for EKS deployment only):
-
aws cli v2: Install latest version of aws cli v2
-
aws-iam-authenticator: Install to authenticate to EKS cluster via AWS IAM
-
IAM user(s) with AWS access keys with following IAM access:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"iam:GetPolicyVersion",
"iam:PutRolePermissionsBoundary",
"iam:DeletePolicy",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:PutRolePolicy",
"iam:DeleteRolePermissionsBoundary",
"iam:CreateLoginProfile",
"iam:ListInstanceProfilesForRole",
"iam:PassRole",
"iam:DetachRolePolicy",
"iam:DeleteRolePolicy",
"iam:ListAttachedRolePolicies",
"iam:ListRolePolicies",
"iam:CreatePolicyVersion",
"iam:DeleteInstanceProfile",
"iam:GetRole",
"iam:GetInstanceProfile",
"iam:GetPolicy",
"iam:ListRoles",
"iam:DeleteRole",
"iam:CreatePolicy",
"iam:ListPolicyVersions",
"iam:UpdateRole",
"iam:DeleteServiceLinkedRole",
"iam:GetRolePolicy",
"iam:DeletePolicyVersion",
"logs:*",
"s3:*",
"autoscaling:*",
"cloudwatch:*",
"elasticloadbalancing:*",
"ec2:*",
"eks:*"
],
"Resource": "*"
}
]
}
Note: Currently only Linux and Unix operating systems are supported for terraform creation of a k8s cluster.
The current k8s cluster configuration is based on a single env file.
You will need to customize the following environment variables as needed (for variables not needed - keep the defaults):
ENV Variable | Script Usage | Description |
---|---|---|
k8s_provider | all | your kubernetes provider name, possible options: eks |
k8s_namespace | fuel-core-deploy | your kubernetes namespace for fuel-core deployment |
fuel_core_ingress_dns | fuel-core-ingress-deploy | the custom dns address for the fuel-core ingress |
fuel_core_ingress_http_port | fuel-core-ingress-deploy | the custom port for the fuel-core ingress |
fuel_core_image_repository | fuel-core-deploy | fuel-core ghcr image registry URI |
fuel_core_image_tag | fuel-core-deploy | fuel-core ghcr image tag |
fuel_core_pod_replicas | fuel-core-deploy | number of fuel-core pod replicas |
pvc_storage_class | fuel-core-deploy | Storage class for the persistent volume |
pvc_storage_requests | fuel-core-deploy | Th size of the request for the persistent volume |
Notes:
- fuel-core-deploy refers to fuel-core-deploy script
Now that the k8s cluster is setup - you can deploy the fuel-core helm chart via the fuel-core-deploy.
./fuel-core-deploy.sh
To check that the helm chart is successful, run the following at your command line:
% helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
fuel-core fuel-core 2 2022-01-12 22:29:28.632358 -0500 EST deployed fuel-core-1.0.0 1.0
% kubectl get all -n fuel-core
NAME READY STATUS RESTARTS AGE
pod/fuel-core-k8s-5f58c6fcbd-h7n5w 1/1 Running 0 131m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/fuel-core-k8s-lb LoadBalancer 172.20.69.45 xxxxxxxxxxxxxx.us-east-1.elb.amazonaws.com 80:31327/TCP 123m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/fuel-core-k8s 1/1 1 1 131m
NAME DESIRED CURRENT READY AGE
replicaset.apps/fuel-core-k8s-5f58c6fcbd 1 1 1 131m
If the "STATUS" is deployed, the fuel-core helm chart has been deployed successfully.
Having fuel-core pod(s) running and a service associated with an External IP, load balancer DNS address further means the helm chart was deployed successfully.
If the helm chart deployments fails and/or the fuel-core pod(s) are not healthy, then you will need to delete the helm chart via fuel-core-delete script:
./fuel-core-delete.sh
Then re-run the fuel-core-deploy script.
In order to serve external HTTP and/or HTTPS traffic, provide load balancing, and SSL termination to your newly deployed fuel-core pod, an ingress k8s object must be deployed.
Before deploying your fuel ingress, you must select a 'fuel_core_ingress_dns' env that will serve as the DNS address for external access of your fuel-core application. The DNS address must be in a DNS domain that you currently own and have access to.
Additionally 'fuel_core_ingress_http_port' env parameter must be selected for the http port, the default is port 80.
In order to support SSL certificate creation for your custom ingress DNS, you must select an 'letsencrypt_email' env which is an email address you have access to renew your letsencrypt certificate when needed. Certificate manager is used to issue the custom certificate via letsencrypt
For fuel ingress is deployed via fuel-core-ingress-deploy script:
./fuel-core-ingress-deploy.sh
It will take several minutes for ingress to be deployed and an external address to show up:
% kubectl get ingress -n fuel-core
NAME CLASS HOSTS ADDRESS PORTS AGE
fuel-core-ingress <none> node.example.io xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.elb.us-east-1.amazonaws.com 80, 443 3d21h
Create a DNS record based on that ADDRESS value in your DNS registrar and your fuel-core application will now be served at your DNS address.
If you need to cleanup your existing ingress resource, run the fuel-core-ingress-delete:
./fuel-core-ingress-delete.sh