Installation
Step 1. Install hln CLIβ
- MacOS
- Linux
Install hln
with HomeBrew:
brew install h8r-dev/tap/heighliner
hln version
Or use the install script:
curl -L https://dl.h8r.io/hln/install.sh | sh
./bin/hln version
sudo mv bin/hln /usr/local/bin/hln
Or download binaries: GitHub Release
Use the install script:
curl -L https://dl.h8r.io/hln/install.sh | sh
./bin/hln version
sudo mv bin/hln /usr/local/bin/hln
Or download binaries: GitHub Release
Step 2. Install Kubernetesβ
Install the following Kubernetes tools:
- Install kubectl by following the Kubernetes documentation.
- Install kind (v0.12.0+) command-line tool by following the kind installation guide
- Install Docker Desktop (v4.5.0+) or Docker by following the docker installation guide
Then choose one of the following methods to install a Kubernetes cluster:
- Kind
- Cloud
(Optional) We recommend setting Docker Resources to 4 cores and 8Gb mem:
Docker Desktop Settings
Save the following configuration as kind.yaml
:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
Create a kind cluster from the config and install ingress controller:
- International
- China
kind create cluster --image=kindest/node:v1.23.5 --config=kind.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kind create cluster --image=kindest/node:v1.23.5 --config=kind.yaml
kubectl apply -f https://raw.githubusercontent.com/h8r-dev/stacks/main/scripts/internal/ingress-nginx/deploy.yaml
Minimal requirements to your Kubernetes cluster.β
- At least 2 CPUs.
- At least 4GB available memory.
- At least 60GB available disk space.
- Internet access must be enabled.
Cloud Providersβ
You can choose one of the following cloud providers for hosted k8s services:
Notes for AWS EKS!
A custom kubeconfig file is required.
Default kubeconfig file generated from
aws eks update-kubeconfig --region region-code --name cluster-name
depends onaws
command and can not be used by Heighliner Stack. Instead, you have to regenerate another kubeconfig with a service account, you could view Create Kubernetes Service Accounts and Kubeconfigs for instructions.Retrive IP address from hostname of load balancer.
After nginx-ingress installed, AWS will assign a hostname to the Nginx load banlancer, that's not what wanted by Heighliner. You will have to retrive an IP address from the hostname with tools such as:
dig
,nslookup
.
Notes for Alibaba ACK
Specify default
StorageClass
is required.ACK will not specify default StorageClass in cluster. so, we have to do it manually. according to it's doc: ACK Disk Volume Overview, we could run below command to specify default
StorageClass
:kubectl patch storageclass alicloud-disk-ssd -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Once a cluster is created, you can check if the ingress controller is installed by running the following command:
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
If it is OK, the output should look like:
pod/ingress-nginx-controller-55c69f5f55-vzcqp condition met
If it is not, you can install it by running the following command:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
For more info about installing the ingress controller, see the ingress-nginx installation guide.
Step 3. Install Heighliner dependenciesβ
hln init
If it is successful, it should output:
...
Waiting buildkitd to be ready...
buildkitd is ready!
Step 4. Create GitHub Tokenβ
Create a GitHub personal access token with these scopes selected:
repo
, workflow
, write:packages
, delete:packages
, admin:org
, user
, delete_repo
.
Then set the token as GITHUB_TOKEN environment variable:
export GITHUB_TOKEN=<your-fresh-token>
What's Next?β
You could create Your First App now.