fix typo
This commit is contained in:
parent
13f213a12b
commit
1f12d55ad0
86
README.md
86
README.md
@ -19,27 +19,31 @@ Complete or modify the values according to your needs
|
||||
|
||||
### Build
|
||||
#### Install plugin php for elasticsearch
|
||||
|
||||
```bash
|
||||
./docker.sh install
|
||||
|
||||
```
|
||||
#### Build image
|
||||
|
||||
```bash
|
||||
./docker.sh build
|
||||
```
|
||||
or
|
||||
|
||||
```bash
|
||||
./docker.sh build-no-cache
|
||||
|
||||
```
|
||||
### Start
|
||||
|
||||
```bash
|
||||
./docker.sh start
|
||||
|
||||
```
|
||||
#### Check
|
||||
|
||||
```bash
|
||||
docker exec wwwgmo-mariadb mysql -uroot -p<MYSQL_ROOT_PASSWORD> mysql -e 'SELECT user,host FROM mysql.user;'
|
||||
|
||||
```
|
||||
```bash
|
||||
docker exec wwwgmo-elasticsearch curl -u elastic:<ELASTIC_PASSWORD> http://wwwgmo-elasticsearch:9200/_cluster/health?pretty
|
||||
|
||||
```
|
||||
```bash
|
||||
docker exec wwwgmo-php-fpm curl -s -u elastic:<ELASTIC_PASSWORD> http://wwwgmo-elasticsearch:9200/_cluster/health?pretty
|
||||
```
|
||||
|
||||
#### Access
|
||||
|
||||
@ -65,22 +69,22 @@ or
|
||||
You need credential to pull an image from private registry.
|
||||
|
||||
Create or modify the secret
|
||||
```
|
||||
kubectl create secret docker-registry secret-regcred --dry-run \
|
||||
```bash
|
||||
kubectl create secret docker-registry secret-regcred --dry-run=client \
|
||||
--docker-server=https://index.docker.io/v1/ \
|
||||
--docker-username=<username> \
|
||||
--docker-password=<secret> \
|
||||
--docker-email=<adress@sample.com> -o yaml > helm/template/site/secret-regcred.yaml
|
||||
--docker-email=<adress@sample.com> -o yaml > helm/template/secret-regcred.yaml
|
||||
```
|
||||
### Certificats
|
||||
|
||||
```bash
|
||||
cat certs/gmolab.net.key | base64 -w0
|
||||
|
||||
copy the base64 result into file `values-secrets-kXs.yaml` in ssl_key key
|
||||
|
||||
```
|
||||
copy the base64 result into file `values-secrets.yaml` in ssl_key key
|
||||
```bash
|
||||
cat certs/gmolab.net.crt | base64 -w0
|
||||
|
||||
copy the base64 result into file `values-config-kXs.yaml` in ssl_crt key
|
||||
```
|
||||
copy the base64 result into file `values-config.yaml` in ssl_crt key
|
||||
|
||||
### Docker image version
|
||||
|
||||
@ -91,54 +95,54 @@ In the `helm/Chart.yaml` file, the `appVersion` value must match the version of
|
||||
This is the recommended way
|
||||
|
||||
>This script builds the docker image based on the Kubernetes VM architecture (AMD64 or ARM64). At each deployment the minor version of the image is incremented by 1.
|
||||
|
||||
```bash
|
||||
./deploy.md -n wwwgmo -k k3s
|
||||
|
||||
```
|
||||
## Manual deployment
|
||||
### Set kubesystem config
|
||||
|
||||
rm -f $HOST/.kube/config
|
||||
|
||||
```bash
|
||||
rm -f $HOME/.kube/config
|
||||
```
|
||||
for **k3s**
|
||||
|
||||
ln -s $HOST/.kube/k3s $HOST/.kube/config
|
||||
|
||||
```bash
|
||||
ln -s $HOME/.kube/k3s $HOST/.kube/config
|
||||
```
|
||||
for **k8s**
|
||||
|
||||
```bash
|
||||
ln -s $HOST/.kube/k8s $HOST/.kube/config
|
||||
|
||||
```
|
||||
### Set namespace and kube system
|
||||
|
||||
```bash
|
||||
export NS=wwwgmo
|
||||
export KUBE_SYS=k3s|k8s
|
||||
|
||||
```
|
||||
### Test template
|
||||
|
||||
```bash
|
||||
helm template $NS --set kube=$KUBE_SYS ./helm --values=./helm/values-configs.yaml --values=./helm/values-secrets.yaml --namespace $NS
|
||||
|
||||
```
|
||||
### Chart deployment
|
||||
|
||||
```bash
|
||||
helm upgrade $NS --set kube=$KUBE_SYS ./helm --install --atomic --cleanup-on-fail --values=./helm/values-configs.yaml --values=./helm/values-secrets.yaml --namespace $NS --create-namespace
|
||||
|
||||
```
|
||||
|
||||
## Remove
|
||||
|
||||
```bash
|
||||
helm uninstall $NS -n $NS
|
||||
kubectl delete namespaces $NS
|
||||
|
||||
```
|
||||
## NOTES
|
||||
### Cronjob
|
||||
When we deploy manually (I do not why) you must trig manually the cronjob to make a DB backup to termine correctly the helm command
|
||||
|
||||
```bash
|
||||
kubectl create job -n $NS --from=cronjob/cronjob-mariadb-backupdb dbbackup-$(date +%Y-%m-%d-%H-%M-%S)
|
||||
|
||||
```
|
||||
## Database
|
||||
Not necessary because created during deployment. We leave the procedure below for information
|
||||
|
||||
First export NS environment variable
|
||||
|
||||
```bash
|
||||
export NS=<your_namespace>
|
||||
|
||||
```
|
||||
You can use `createDBOnKube.sh` or create manually with below commands
|
||||
|
||||
#### Create user
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user