Initiate Mage
- Joined
- Aug 24, 2019
- Messages
- 4
- Reaction score
- 1
Hello everyone,
I'm going to attempt to build a fairly resilient, low-lag, and high availability GBS2 server. I don't have much going on right now so I figured this would be a fun project that could have a cool outcome.
Project name: Gunbound Clasic Cloud (GBCC)
Thanks to musashi076 as I'm referencing most of the files for this project from your tutorial.
--------------
I've rebuilt a beat-up old MacBook Pro to use as my dedicated Kubernetes compute/control (etcd) node. To accomplish this I will be using the minikube software for UNIX based machines.
Node specs: 8Gi Memory, 2 CPU cores, and 750Gi HDD
Considering most packages available to stand up GB servers are compressed into RAR archives I've installed the unrar package.
-------------
I've set-up a new directory on the server and called it GBCC and created a sub-directory called mysql_server - I'll UnRAR the Gb_Serv.rar archive in the GBCC directory and move all the .sql files to the mysql_server sub-directory.
Now that I've isolated all the SQL files I want to be in my database I've create a deployment.yaml file and service.yaml for describing all the resources to be deployed to Kubernetes.
I also needed to create a generic key,value secret Kubernetes resource to hold the MySQL password
For now Minikube has an odd way of managin NodePort type ingress so the "External-IP" shows pending.
How to get phpMyAdmin URL
Here is a snapshot of our GBCC in the cloud so far!
If you notice I can up the replicas of phpMyAdmin/MySQL server instances greatly increasing the volume of traffic I can handle to that service.
Here is what we have so far...Stay tuned for more to come...This was the easy part (I think)
screnshots:
I'm going to attempt to build a fairly resilient, low-lag, and high availability GBS2 server. I don't have much going on right now so I figured this would be a fun project that could have a cool outcome.
Project name: Gunbound Clasic Cloud (GBCC)
Thanks to musashi076 as I'm referencing most of the files for this project from your tutorial.
--------------
I've rebuilt a beat-up old MacBook Pro to use as my dedicated Kubernetes compute/control (etcd) node. To accomplish this I will be using the minikube software for UNIX based machines.
Node specs: 8Gi Memory, 2 CPU cores, and 750Gi HDD
Considering most packages available to stand up GB servers are compressed into RAR archives I've installed the unrar package.
-------------
I've set-up a new directory on the server and called it GBCC and created a sub-directory called mysql_server - I'll UnRAR the Gb_Serv.rar archive in the GBCC directory and move all the .sql files to the mysql_server sub-directory.
Code:
mv Gb_Serv.rar ../Desktop/GBCC/
cd ../Desktop/GBCC
unrar x Gb_Serv.rar
mv Gb_Serv/DB/ mysql_server/
Now that I've isolated all the SQL files I want to be in my database I've create a deployment.yaml file and service.yaml for describing all the resources to be deployed to Kubernetes.
Code:
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin-deployment
labels:
app: phpmyadmin
spec:
replicas: 1
selector:
matchLabels:
app: phpmyadmin
template:
metadata:
labels:
app: phpmyadmin
spec:
containers:
- name: phpmyadmin
image: phpmyadmin/phpmyadmin
ports:
- containerPort: 80
env:
- name: PMA_HOST
value: mysql-service
- name: PMA_PORT
value: "3306"
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-secrets
key: ROOT_PASSWORD
Code:
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin-service
spec:
type: NodePort
selector:
app: phpmyadmin
ports:
- protocol: TCP
port: 80
targetPort: 80
I also needed to create a generic key,value secret Kubernetes resource to hold the MySQL password
Code:
kubectl create secret generic mysql-secrets \
--from-literal ROOT_PASSWORD=alpine
Code:
minikube start
kubectl create namespace gbcc
kubens gbcc
kubectl create -f mysql_server/deployment.yaml
kubectl create -f mysql_server/service.yaml
For now Minikube has an odd way of managin NodePort type ingress so the "External-IP" shows pending.
How to get phpMyAdmin URL
Code:
minikube service --url phpmyadmin-service -n gbcc
Here is a snapshot of our GBCC in the cloud so far!
Code:
NAME READY STATUS RESTARTS AGE
pod/phpmyadmin-deployment-55594bcfb5-tmfx5 1/1 Running 0 20s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/phpmyadmin-service NodePort 10.97.198.225 <none> 80:31043/TCP 10s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/phpmyadmin-deployment 1/1 1 1 20s
NAME DESIRED CURRENT READY AGE
replicaset.apps/phpmyadmin-deployment-55594bcfb5 1 1 1 20s
If you notice I can up the replicas of phpMyAdmin/MySQL server instances greatly increasing the volume of traffic I can handle to that service.
Here is what we have so far...Stay tuned for more to come...This was the easy part (I think)
screnshots:
Last edited: