Compare commits

...

2 Commits

Author SHA1 Message Date
07c29826ad comparison 2021-03-28 23:32:05 -06:00
e61ec35755 michael bingel 2021-03-28 23:31:30 -06:00
2 changed files with 98 additions and 27 deletions

View File

@ -1,29 +1,71 @@
Recommended content: Hello, Adolfo from Portainer here
From a single server MVP to scale easy with Portainer
We assume you already have you web-app running within a container
Select your orchestration (what is best practice, what are reasons, what are limits ???)
- Kubernetes We have prepared a set of comparison videos of Portainer vs 4 different Kubernetes management tools:
- Docker Swarm
10-100 server : Docker Swarm Kubernetes Dashboard
50-200 server: microk8s (easy as docker swarm, but prepare for further growth ???) Lens
100-100.000: kubernetes CrossPlane
Setup infrastructure (swarm or microk8s) Rancher UI
Launch servers (virtual or bare metal)
Create master
Join further nodes the idea is to basically show the steps required to deploy an application on each of the tools vs Portainer and I am going to use a basic implementation of the redis database.
Launch Portainer
Launch reverse proxy via Portainer
The reverse proxy will automatically load balance all incoming requests to the web-app containers Here I start with Portainer vs Kubernetes Dashboard with a redis server deployment. In both cases I use microk8s and the process starts with the search for the proper container image in both cases.
The proxy will hot reload when containers change, not interrupt ongoing and long-running requests (?)
The proxy can automatically forward to services based on sub-domains and/or paths via labels (?) In Portainer I used the Applications menu option and deployed redis with ,
Launch services (web-app and others)
Launch you services with Portainer, set labels for sub-domain and/or path
Example: www (wordpress), api (nodejs) (?) bitnami/redis
Database: only one instance per server on dedicated servers
Scale up
Check metrics
Easily scale services up and down, add more servers
7. b. Manage credentials, pass them to the web-app so it can connect to the database. apiVersion: v1
kind: ConfigMap
metadata:
name: example-redis-config
data:
redis-config: ""
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis:5.0.4
command:
- redis-server
- "/redis-master/redis.conf"
env:
- name: MASTER
value: "true"
ports:
- containerPort: 6379
resources:
limits:
cpu: "0.1"
volumeMounts:
- mountPath: /redis-master-data
name: data
- mountPath: /redis-master
name: config
volumes:
- name: data
emptyDir: {}
- name: config
configMap:
name: example-redis-config
items:
- key: redis-config
path: redis.conf
token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)
microk8s kubectl -n kube-system describe secret $token
kubectl create clusterrolebinding --user system:serviceaccount:kube-system:default kube-system-cluster-admin --clusterrole cluster-admin

29
michael bingel Normal file
View File

@ -0,0 +1,29 @@
Recommended content:
From a single server MVP to scale easy with Portainer
We assume you already have you web-app running within a container
Select your orchestration (what is best practice, what are reasons, what are limits ???)
- Kubernetes
- Docker Swarm
10-100 server : Docker Swarm
50-200 server: microk8s (easy as docker swarm, but prepare for further growth ???)
100-100.000: kubernetes
Setup infrastructure (swarm or microk8s)
Launch servers (virtual or bare metal)
Create master
Join further nodes
Launch Portainer
Launch reverse proxy via Portainer
The reverse proxy will automatically load balance all incoming requests to the web-app containers
The proxy will hot reload when containers change, not interrupt ongoing and long-running requests (?)
The proxy can automatically forward to services based on sub-domains and/or paths via labels (?)
Launch services (web-app and others)
Launch you services with Portainer, set labels for sub-domain and/or path
Example: www (wordpress), api (nodejs) (?)
Database: only one instance per server on dedicated servers
Scale up
Check metrics
Easily scale services up and down, add more servers
7. b. Manage credentials, pass them to the web-app so it can connect to the database.