### Install and Setup Dependencies Source: https://github.com/antonputra/tutorials/blob/main/lessons/222/elixir-app/README.md Run this command to install project dependencies and perform initial setup. ```bash mix setup ``` -------------------------------- ### Set up Python Virtual Environment and Install Dependencies Source: https://github.com/antonputra/tutorials/blob/main/lessons/199/README.md Initializes a Python virtual environment, activates it, installs Flask, and saves the dependencies to requirements.txt. This is a standard setup for Python web applications. ```bash python3 -m venv .venv ``` ```bash source .venv/bin/activate ``` ```bash pip install Flask ``` ```bash pip freeze > requirements.txt ``` -------------------------------- ### Install and Configure Valkey Source: https://github.com/antonputra/tutorials/blob/main/lessons/258/README.md Installs Valkey from source, configures system settings for performance, and sets up a systemd service. Ensure Valkey is not already installed before running. ```bash export VALKEY_VER="8.1.1" wget https://github.com/valkey-io/valkey/archive/refs/tags/${VALKEY_VER}.tar.gz tar -xzf ${VALKEY_VER}.tar.gz sudo mv valkey-${VALKEY_VER}/ /opt/valkey cd /opt/valkey/ make sudo make install cat < 16/32 /usr/local/bin/redis-server --io-threads 9 --io-threads-do-reads yes --save --protected-mode no /usr/local/bin/valkey-server --io-threads 9 --io-threads-do-reads yes --save --protected-mode no ``` -------------------------------- ### Create Directory and Change to It Source: https://github.com/antonputra/tutorials/blob/main/lessons/081/README.md Prepare the environment for installing acme-dns by creating a directory and navigating into it. ```bash sudo mkdir /opt/acme-dns cd !$ ``` -------------------------------- ### Preview VPA Installation YAMLs Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Use the `vpa-process-yamls.sh` script to preview the YAML manifests that will be applied for VPA installation without actually applying them. ```bash ./hack/vpa-process-yamls.sh print ``` -------------------------------- ### Start Nginx Service Source: https://github.com/antonputra/tutorials/blob/main/lessons/078/README.md Start the Nginx web server process. ```bash sudo systemctl start nginx ``` -------------------------------- ### Monitor Pods During Installation Source: https://github.com/antonputra/tutorials/blob/main/lessons/089/README.md Use 'watch' to continuously monitor the pods across all namespaces during the installation process, helping to identify any issues. ```bash watch kubectl get pods -A ``` -------------------------------- ### Install Helm Chart Source: https://github.com/antonputra/tutorials/blob/main/lessons/021/README.md Installs the 'hello-wolrd' Helm chart into the 'dev' namespace. It uses a specified values file for configuration. ```bash kubectl create namespace dev ``` ```bash helm install -f hello-wolrd/values.yaml -n dev hello-wolrd ./hello-wolrd ``` -------------------------------- ### Install gate-sso Dependencies Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Navigate into the gate-sso directory and install its Ruby dependencies using Bundler. ```bash cd gate bundle install ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/antonputra/tutorials/blob/main/lessons/213/bun-app/README.md Use this command to install all project dependencies managed by Bun. ```bash bun install ``` -------------------------------- ### Install Certbot via Snap Source: https://github.com/antonputra/tutorials/blob/main/lessons/078/README.md Install the Certbot client using the snap package manager. ```bash sudo snap install --classic certbot ``` -------------------------------- ### Install MySQL Client on Ubuntu Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install the MySQL client package, which is needed to connect to and manage MySQL databases. ```bash sudo apt install mysql-client ``` -------------------------------- ### Install Node.js Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install Node.js, which is often required for front-end asset compilation or other build processes. ```bash sudo apt install nodejs ``` -------------------------------- ### Enable Nginx Service Source: https://github.com/antonputra/tutorials/blob/main/lessons/078/README.md Configure Nginx to start automatically on system boot. ```bash sudo systemctl enable nginx ``` -------------------------------- ### Install MySQL Client Development Library Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install the MySQL client development library, which may be a dependency for certain gems. ```bash sudo apt-get install libmysqlclient-dev ``` -------------------------------- ### Install PostgreSQL Helm Chart Source: https://github.com/antonputra/tutorials/blob/main/lessons/072/README.md Installs the Bitnami PostgreSQL Helm chart with specified values, version, and namespace. Creates the namespace if it doesn't exist. ```bash helm install postgres \ bitnami/postgresql \ --values postgres-values.yaml \ --version 10.5.0 \ --namespace db \ --create-namespace ``` -------------------------------- ### Start Elixir Server with IEx Source: https://github.com/antonputra/tutorials/blob/main/lessons/222/elixir-app/README.md Use this command to start the Elixir interactive shell and run the application server. ```bash iex -S mix ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/antonputra/tutorials/blob/main/lessons/050/drage/README.md Run this command in your project's root directory to install all necessary npm packages. ```bash npm install ``` -------------------------------- ### Enable OpenVPN Server Service on Boot Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Configure the OpenVPN server service to start automatically when the system boots up. ```bash sudo systemctl enable openvpn-server@server ``` -------------------------------- ### Start Rails Server Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Start the Rails server in the background, binding to all interfaces on port 80. ```bash rvmsudo rails server \ --port 80 \ --binding 0.0.0.0 \ --daemon ``` -------------------------------- ### Install Rust and Build Release Project Source: https://github.com/antonputra/tutorials/blob/main/lessons/245/README.md Installs Rust using rustup and then builds a Rust project in release mode, ensuring the environment is set up for performance testing. ```bash curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y cd /tmp/rust-app source $HOME/.cargo/env && cargo build --release ``` -------------------------------- ### Install RVM (Ruby Version Manager) Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Download and install RVM using the provided script. RVM allows managing multiple Ruby environments. ```bash curl -L https://get.rvm.io | bash -s stable ``` -------------------------------- ### Install Prometheus Stack Helm Chart Source: https://github.com/antonputra/tutorials/blob/main/lessons/072/README.md Installs the kube-prometheus-stack Helm chart with specified values, version, and namespace. Creates the namespace if it doesn't exist. ```bash helm install monitoring \ prometheus-community/kube-prometheus-stack \ --values prometheus-values.yaml \ --version 16.10.0 \ --namespace monitoring \ --create-namespace ``` -------------------------------- ### Install Vercel NCC for Bundling Source: https://github.com/antonputra/tutorials/blob/main/lessons/088/README.md Install vercel/ncc globally to bundle your JavaScript action into a single file. ```bash npm i -g @vercel/ncc ``` -------------------------------- ### Install Dependencies Source: https://github.com/antonputra/tutorials/blob/main/lessons/076/README.md Install necessary npm packages for AWS SDK, UUID generation, and HTTP requests. ```bash npm i aws-sdk uuid axios ``` -------------------------------- ### Install Metrics Server using Helm Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Install the `metrics-server` Helm chart into the `kube-system` namespace. Specify the chart version and a custom `values.yaml` file. ```bash helm install metrics bitnami/metrics-server \ --namespace kube-system \ --version 5.8.13 \ --values values.yaml ``` -------------------------------- ### Application Setup and Port Forwarding Source: https://github.com/antonputra/tutorials/blob/main/lessons/178/README.md Navigate to the application directory, tidy dependencies, and set up port forwarding for Grafana and the application. ```bash cd .. cd myapp go mod tidy kubectl get pods -n monitoring kubectl port-forward svc/tempo 4318 -n monitoring export OTLP_ENDPOINT=localhost:4318 curl http://0.0.0.0:8080/devices kubectl port-forward svc/grafana 3000:80 -n monitoring # Datasource URL: http://tempo.monitoring:3100 ``` -------------------------------- ### Install Docker Engine on Ubuntu Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Update the package list and install Docker CE, the command-line interface, and containerd.io. ```bash sudo apt update sudo apt install \ docker-ce docker-ce-cli containerd.io ``` -------------------------------- ### Install LibreSSL using Homebrew Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Install or upgrade LibreSSL using the Homebrew package manager on macOS. ```bash brew install libressl ``` -------------------------------- ### Navigate to Application Directory Source: https://github.com/antonputra/tutorials/blob/main/lessons/182/0-app/README.md Change your current directory to the '0-app' folder within the tutorials lesson. ```bash cd tutorials/lessons/182/0-app ``` -------------------------------- ### Clone and Navigate Tutorial Repository Source: https://github.com/antonputra/tutorials/blob/main/lessons/178/README.md Clone the tutorial repository and navigate to the specific lesson directory. ```bash git clone git@github.com:antonputra/tutorials.git cd tutorials/lessons/178 ``` -------------------------------- ### Install Istio Ingress Controller Source: https://github.com/antonputra/tutorials/blob/main/lessons/280/README.md Installs or upgrades the Istio ingress controller (istiod) using Helm, creating the necessary namespace if it doesn't exist. ```bash helm upgrade --install istiod istio/istiod --namespace istio-system --create-namespace ``` -------------------------------- ### Install Psycopg for Python Source: https://github.com/antonputra/tutorials/blob/main/lessons/199/README.md Installs the psycopg library for Python, including binary and pooling support, to enable database connections. ```bash pip install "psycopg[binary,pool]" ``` -------------------------------- ### POST /api/devices Request Body Example Source: https://github.com/antonputra/tutorials/blob/main/lessons/222/ruby-app-node-equivalent/README.md Example JSON request body for creating a new device via the POST /api/devices endpoint. Requires MAC address and firmware version. ```json { "mac": "AA-BB-CC-DD-EE-FF", "firmware": "1.0.0" } ``` -------------------------------- ### Start OpenVPN Server Service Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Start the OpenVPN server service. The '@server' part typically refers to the configuration file name (e.g., server.conf). ```bash sudo systemctl start openvpn-server@server ``` -------------------------------- ### Get OpenSSL Version on Mac/OS X Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Check the currently installed version of OpenSSL on your macOS system. ```bash openssl version ``` -------------------------------- ### Install Certbot via Snap Source: https://github.com/antonputra/tutorials/blob/main/lessons/081/README.md Install Certbot using snap, ensuring core components are up-to-date and creating a symbolic link for easier access. ```bash cd sudo snap install core; sudo snap refresh core sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot ``` -------------------------------- ### Install Vertical Pod Autoscaler Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Execute the `vpa-up.sh` script to install the Vertical Pod Autoscaler components into the Kubernetes cluster. ```bash ./hack/vpa-up.sh ``` -------------------------------- ### Install OpenVPN and Easy-RSA Source: https://github.com/antonputra/tutorials/blob/main/lessons/270/README.md Installs OpenVPN and its certificate management tool, Easy-RSA, on a Debian-based system. Ensures repositories are updated and keys are managed securely. ```bash sudo apt-get update && sudo apt-get -y upgrade curl -fsSL https://swupdate.openvpn.net/repos/repo-public.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/openvpn.gpg echo "deb [signed-by=/etc/apt/keyrings/openvpn.gpg] http://build.openvpn.net/debian/openvpn/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/openvpn.list sudo apt-get update sudo apt-get install -y openvpn wget https://github.com/OpenVPN/easy-rsa/releases/download/v3.2.4/EasyRSA-3.2.4.tgz tar -zxf EasyRSA-3.2.4.tgz sudo mv EasyRSA-3.2.4/ /etc/openvpn/easy-rsa sudo ln -s /etc/openvpn/easy-rsa/easyrsa /usr/local/bin/ ``` -------------------------------- ### Install and Connect to vcluster Source: https://github.com/antonputra/tutorials/blob/main/lessons/092/README.md Use these commands to create a new vcluster, connect to it, and then create and manage resources within a specific namespace. ```bash vcluster create vcluster-1 -n host-namespace-1 vcluster connect vcluster-1 --namespace host-namespace-1 kubectl get namespace kubectl create namespace demo-nginx kubectl create deployment nginx-deployment -n demo-nginx --image=nginx kubectl get pods -n demo-nginx kubectl get deployment -n host-namespace-1 kubectl get pods -n host-namespace-1 ``` -------------------------------- ### Get Pod Metrics Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Use `kubectl top pods` to view resource (CPU/memory) usage for pods in the `kube-system` namespace. Requires the metrics server to be installed. ```bash kubectl top pods -n kube-system ``` -------------------------------- ### Install Specific OpenVPN Version Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install a specific version of OpenVPN from the configured repository. Ensure the version number matches availability. ```bash sudo apt install openvpn=2.5.3-focal0 ``` -------------------------------- ### Get Application URL with ClusterIP Service Source: https://github.com/antonputra/tutorials/blob/main/lessons/022/3/app/templates/NOTES.txt This snippet sets up port-forwarding for a ClusterIP service to access the application locally. It retrieves the pod name and container port, then echoes a local URL and starts the port-forwarding. ```bash {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "app.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT {{- end }} ``` -------------------------------- ### Setup and Use Overlay Network for Swarm Source: https://github.com/antonputra/tutorials/blob/main/lessons/188/README.md Demonstrates setting up an overlay network for Docker Swarm. Includes initializing a swarm, creating an attachable overlay network, and running containers on different hosts within the overlay network. ```bash (host 1) ip addr (host 1) sudo ethtool -K ens33 tx-checksum-ip-generic off (host 2) ip addr (host 2) sudo ethtool -K ens33 tx-checksum-ip-generic off (host 1) docker swarm init (host 2) docker swarm join ... (host 1) docker network create -d overlay --attachable my-overlay-net (host 1) docker network ls ``` ```bash (host 1) docker run -d --name myapp --network my-overlay-net aputra/myapp-188:v3 (host 2) docker network ls (host 2) docker run -dit --name myapp-v2 --network my-overlay-net aputra/myapp-188:v3 (host 2) docker network ls (host 2) docker exec -it myapp-v2 sh curl myapp:8080/api/info ``` -------------------------------- ### Terraform Initialization and Application Source: https://github.com/antonputra/tutorials/blob/main/lessons/178/README.md Initialize Terraform and apply the configurations for setting up the environment. ```bash cd terraform terraform init terraform apply ``` -------------------------------- ### Install/Update Snapd Source: https://github.com/antonputra/tutorials/blob/main/lessons/078/README.md Install snapd if not present, or update it to the latest version. ```bash sudo apt install snapd ``` -------------------------------- ### POST /api/devices Success Response Example Source: https://github.com/antonputra/tutorials/blob/main/lessons/222/ruby-app-node-equivalent/README.md Example JSON response for a successful device creation (201 Created) via POST /api/devices. Includes the generated ID and UUID. ```json { "id": 4, "uuid": "generated-uuid", "mac": "AA-BB-CC-DD-EE-FF", "firmware": "1.0.0", "created_at": "2024-11-08T12:34:56.789Z", "updated_at": "2024-11-08T12:34:56.789Z" } ``` -------------------------------- ### Update Helm Dependencies and Install Chart Source: https://github.com/antonputra/tutorials/blob/main/lessons/022/README.md After defining dependencies, run `helm dependency update` to fetch them and then `helm install` to deploy your chart. ```bash $ helm dependency update $ helm install -f values.yaml web . ``` -------------------------------- ### Install AWS SAM CLI on macOS Source: https://github.com/antonputra/tutorials/blob/main/lessons/075/README.md Installs the AWS SAM CLI using Homebrew on macOS. Ensure Homebrew is installed first. ```bash brew tap aws/tap ``` ```bash brew install aws-sam-cli ``` ```bash sam --version ``` -------------------------------- ### Initialize PKI Directory Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Prepare the directory structure for the Public Key Infrastructure (PKI) using easy-rsa. ```bash easyrsa init-pki ``` -------------------------------- ### Install Cert-Manager Helm Chart Source: https://github.com/antonputra/tutorials/blob/main/lessons/089/README.md Install the cert-manager Helm chart into the 'cert-manager' namespace. This command installs version v1.6.0 and disables Prometheus metrics. ```bash helm install \ cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --version v1.6.0 \ --set prometheus.enabled=false \ --set installCRDs=true ``` -------------------------------- ### Install Nginx Ingress Controller Source: https://github.com/antonputra/tutorials/blob/main/lessons/083/README.md Installs the Nginx Ingress Controller using Helm. This command specifies the chart version, namespace, and a custom values file. ```bash helm install ing-083 ingress-nginx/ingress-nginx \ --namespace ingress \ --version 4.0.1 \ --values nginx-ingress-values.yaml \ --create-namespace ``` -------------------------------- ### Install PyTorch Pip Package (macOS) Source: https://github.com/antonputra/tutorials/blob/main/lessons/067/README.md Install the PyTorch and Torchvision packages using pip on macOS. This command installs the default versions available. ```bash pip install torch torchvision ``` -------------------------------- ### Fetch and Configure Protobuf Source: https://github.com/antonputra/tutorials/blob/main/lessons/274/app/CMakeLists.txt Downloads the Protobuf library from GitHub and configures it to disable tests and examples, speeding up the build process. ```cmake include(FetchContent) FetchContent_Declare( protobuf GIT_REPOSITORY https://github.com/protocolbuffers/protobuf GIT_TAG v33.2 ) # Disable tests and examples to speed up the build set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(protobuf_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(protobuf) ``` -------------------------------- ### Run Ruby Application Server Source: https://github.com/antonputra/tutorials/blob/main/lessons/220/ruby-app/README.md Start the Ruby application server using Iodine on port 8080. ```bash bin/iodine -p 8080 ``` -------------------------------- ### Run Development Server Source: https://github.com/antonputra/tutorials/blob/main/lessons/219/my-website/README.md Use one of these commands to start the Next.js development server. Open http://localhost:3000 in your browser to view the application. ```bash npm run dev # or yarn dev # or pnpm dev # or bun dev ``` -------------------------------- ### Install Ruby Version with RVM Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install a specific Ruby version (e.g., 2.4.3) using RVM. This command fetches, compiles, and installs the Ruby interpreter. ```bash rvm install 2.4.3 ``` -------------------------------- ### Run NestJS Application Source: https://github.com/antonputra/tutorials/blob/main/lessons/050/drage/README.md Commands to start the NestJS application in different modes. Use 'start:dev' for development with watch mode, and 'start:prod' for production builds. ```bash npm run start ``` ```bash npm run start:dev ``` ```bash npm run start:prod ``` -------------------------------- ### Install Dragonfly Source: https://github.com/antonputra/tutorials/blob/main/lessons/228/README.md Installs Dragonfly using a .deb package. Ensure the version variable is set correctly. This process involves downloading, installing, configuring, and enabling the Dragonfly service. ```bash export VERSION="1.25.4" wget https://github.com/dragonflydb/dragonfly/releases/download/v${VERSION}/dragonfly_amd64.deb sudo dpkg -i dragonfly_amd64.deb sudo tee /etc/dragonfly/dragonfly.conf < /dev/null ``` -------------------------------- ### Create OpenVPN Server Configuration File Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Create the main configuration file for the OpenVPN server. This step involves using a text editor like vim. ```bash sudo vim /etc/openvpn/server/server.conf ``` -------------------------------- ### Install Docker Compose on Ubuntu Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install the Docker Compose plugin, which allows you to manage multi-container Docker applications. ```bash sudo apt install docker-compose ``` -------------------------------- ### Install Crossplane on Kubernetes Source: https://github.com/antonputra/tutorials/blob/main/lessons/176/README.md Installs Crossplane using Helm on a Minikube cluster. Ensure Docker is available for Minikube. ```bash minikube start --driver=docker helm repo add crossplane-stable https://charts.crossplane.io/stable helm repo update helm search repo crossplane helm install crossplane \ --namespace crossplane-system \ --create-namespace \ --version 1.13.2 \ crossplane-stable/crossplane kubectl get pods -n crossplane-system kubectl get crds | grep crossplane.io ``` -------------------------------- ### Apply AWS Provider Installer Source: https://github.com/antonputra/tutorials/blob/main/lessons/079/README.md Apply the Kubernetes manifests for the AWS Secrets & Configuration Provider (ASCP) installer. ```bash kubectl apply -f aws-provider-installer ``` -------------------------------- ### Navigate to VPA Directory (Continued) Source: https://github.com/antonputra/tutorials/blob/main/lessons/074/README.md Change directory to the VPA installation path, assuming it's located within a `Developer` directory. ```bash cd Developer/autoscaler/vertical-pod-autoscaler ``` -------------------------------- ### Create React App Source: https://github.com/antonputra/tutorials/blob/main/lessons/100/README.md Use this command to create a new React application. ```bash npx create-react-app react-pages-demo ``` -------------------------------- ### Add OpenVPN APT Repository Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Configure your system to use the official OpenVPN APT repository for stable releases. ```bash echo "deb http://build.openvpn.net/debian/openvpn/stable focal main" > /etc/apt/sources.list.d/openvpn-aptrepo.list ``` -------------------------------- ### Start Redis and Valkey Servers with IO Threads Source: https://github.com/antonputra/tutorials/blob/main/lessons/272/README.md Launches Redis and Valkey servers on an EC2 c8g.4xlarge instance, configuring them to use 9 IO threads and disabling protected mode. This is useful for performance testing and comparison. ```bash # ec2: c8g.4xlarg /usr/local/bin/redis-server --io-threads 9 --save --protected-mode no /usr/local/bin/valkey-server --io-threads 9 --save --protected-mode no ``` -------------------------------- ### Install Firebase CLI Globally Source: https://github.com/antonputra/tutorials/blob/main/lessons/085/README.md Install the Firebase Command Line Interface globally. This tool is required for interacting with Firebase services. ```bash npm install -g firebase-tools ``` -------------------------------- ### Set Vcpkg Installation Directory Source: https://github.com/antonputra/tutorials/blob/main/lessons/248/app/CMakeLists.txt Defines the VCPKG_ROOT_DIR variable, which points to the Vcpkg installed libraries directory based on the determined target triplet. ```cmake set(VCPKG_ROOT_DIR ${CMAKE_BINARY_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}) ``` -------------------------------- ### Install IP Tables Persistent Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Install the iptables-persistent package to ensure that IP Tables rules are saved and reloaded automatically after a system reboot. ```bash sudo apt-get install iptables-persistent ``` -------------------------------- ### Manage OpenVPN Server Service Source: https://github.com/antonputra/tutorials/blob/main/lessons/270/README.md Starts, checks the status of, and enables the OpenVPN server service to run on boot. Also shows how to follow the server logs in real-time. ```bash sudo systemctl start openvpn-server@server sudo systemctl status openvpn-server@server sudo systemctl enable openvpn-server@server journalctl --no-pager --full -u openvpn-server@server -f ``` -------------------------------- ### Install Cert-Manager with Helm Source: https://github.com/antonputra/tutorials/blob/main/lessons/083/README.md Installs Cert Manager into the specified Kubernetes namespace using Helm. Ensure you have a 'cert-manager-values.yaml' file if overriding defaults. ```bash helm install cert-083 jetstack/cert-manager \ --namespace cert-manager \ --version v1.5.3 \ --values cert-manager-values.yaml ``` -------------------------------- ### List PKI Directories Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Inspect the contents of the PKI directory after initialization. ```bash ls ls pki ``` -------------------------------- ### Install Nginx Ingress Controller with Helm Source: https://github.com/antonputra/tutorials/blob/main/lessons/280/README.md Installs or upgrades the Nginx Ingress controller using Helm, applying custom configurations from a values file. ```bash helm upgrade --install ingress ingress-nginx/ingress-nginx --values values/nginx-ingress.yaml --namespace ingress --create-namespace ``` -------------------------------- ### Initialize Terraform Source: https://github.com/antonputra/tutorials/blob/main/lessons/020/README.md Run this command in your Terraform project directory to initialize the backend and download provider plugins. ```bash $ terraform init ``` -------------------------------- ### Set Up Default Google Cloud Credentials Source: https://github.com/antonputra/tutorials/blob/main/lessons/069/README.md Run this command to authenticate and set up default credentials for Google Cloud. This is necessary before using gcloud or other tools that interact with Google Cloud. ```bash gcloud auth application-default login ``` -------------------------------- ### Terraform and Git Commands for EKS Setup Source: https://github.com/antonputra/tutorials/blob/main/lessons/268/README.md Execute these commands to initialize Terraform, apply configurations for S3, IAM, ECR, VPC, and EKS, and then push changes to trigger the CI/CD pipeline. ```bash cd envs/global/s3 terraform init terraform apply -var-file=../global.tfvars ``` ```bash terraform init -migrate-state -backend-config=../state.config cd ../iam terraform init -backend-config=../state.config terraform apply -var-file=../global.tfvars ``` ```bash cd ../ecr terraform init -backend-config=../state.config terraform apply -var-file=../global.tfvars ``` ```bash git commit --allow-empty -m "trigger ci/cd" git push origin main ``` ```bash cd ../../dev/vpc/ terraform init -backend-config=../state.config terraform apply -var-file=../dev.tfvars -var-file=vpc.tfvars ``` ```bash cd ../eks terraform init -backend-config=../state.config terraform apply -var-file=../dev.tfvars -var-file=eks.tfvars ``` -------------------------------- ### Verify Terraform and Ansible Installation Source: https://github.com/antonputra/tutorials/blob/main/lessons/101/README.md Checks if Terraform and Ansible are installed and accessible in the system's PATH. This is a prerequisite for running Terraform and Ansible commands. ```bash command -v terraform command -v ansible-playbook ``` -------------------------------- ### Build Zig and Rust Projects for Release Source: https://github.com/antonputra/tutorials/blob/main/lessons/278/README.md Use these commands to compile your Zig and Rust projects with optimizations enabled for performance benchmarking. Ensure you are in the project's root directory. ```shell zig build -Doptimize=ReleaseFast ``` ```shell cargo build --release ``` -------------------------------- ### Initialize Application Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Run the rake task to initialize the gate-sso application. ```bash rake app:init ``` -------------------------------- ### Run React App Locally Source: https://github.com/antonputra/tutorials/blob/main/lessons/085/README.md Start the development server to run the React application locally. This allows for real-time preview during development. ```bash npm start ``` -------------------------------- ### Kubernetes Deployment and Service Management Source: https://github.com/antonputra/tutorials/blob/main/lessons/178/README.md Apply Kubernetes configurations, check pods and services, and port-forward the application service. ```bash kubectl apply -f k8s kubectl get pods -n default kubectl get svc -n default kubectl port-forward svc/myapp 8080:8080 -n default ``` -------------------------------- ### Install Secrets Store CSI Driver using Helm Source: https://github.com/antonputra/tutorials/blob/main/lessons/079/README.md Install the Secrets Store CSI Driver using its Helm chart into the kube-system namespace. ```bash helm -n kube-system install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver ``` -------------------------------- ### Assemble OpenVPN Client Profile (.ovpn) Source: https://github.com/antonputra/tutorials/blob/main/lessons/084/README.md Concatenate the CA certificate, client certificate, client private key, and TLS auth key to create the client's .ovpn profile file. Ensure all paths are correct. ```bash cat /etc/openvpn/easy-rsa/pki/ca.crt cat \ /etc/openvpn/easy-rsa/pki/issued/example-1.crt cat \ /etc/openvpn/easy-rsa/pki/private/example-1.key cat /etc/openvpn/ta.key ``` -------------------------------- ### Install Gateway API CRDs Source: https://github.com/antonputra/tutorials/blob/main/lessons/280/README.md Applies the standard installation of Gateway API Custom Resource Definitions (CRDs) to the Kubernetes cluster using server-side apply. ```bash kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/standard-install.yaml ``` -------------------------------- ### Run Flask Application Locally Source: https://github.com/antonputra/tutorials/blob/main/lessons/199/README.md Starts the Flask development server. Ensure the Flask app is correctly configured with the --app flag. ```bash flask --app app run ``` -------------------------------- ### Create Redis Cluster Source: https://github.com/antonputra/tutorials/blob/main/lessons/228/README.md Sets up a Redis cluster. This involves installing Redis, configuring it for cluster mode, and then using redis-cli to create the cluster with specified nodes and replica count. ```bash export REDIS_VER="7.4.1" wget https://github.com/redis/redis/archive/refs/tags/${REDIS_VER}.tar.gz tar -xzf ${REDIS_VER}.tar.gz sudo mv redis-${REDIS_VER}/ /opt/redis cd /opt/redis/ make sudo make install cat <