Commit 52b14689 authored by 胡凯旋's avatar 胡凯旋

add crt

parent b83d7c3c
...@@ -50,14 +50,19 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da ...@@ -50,14 +50,19 @@ http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-da
## 服务初次部署 ## 服务初次部署
1. docker login harbor.test.gengmei 1. 添加证书,重启docker
```
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./harbor.crt
```
2. docker login harbor.test.gengmei
``` ```
docker login harbor.test.gengmei docker login harbor.test.gengmei
username: gmuser username: gmuser
password: Gengmei123! password: Gengmei123!
``` ```
2. 创建项目目录,日志目录到指定位置 3. 创建项目目录,日志目录到指定位置
``` ```
sudo mkdir -p /data/log/backend/app /data/log/gaia/app /data/log/mimas/app /data/log/doris/app # ... sudo mkdir -p /data/log/backend/app /data/log/gaia/app /data/log/mimas/app /data/log/doris/app # ...
sudo mkdir -p /srv/apps sudo mkdir -p /srv/apps
...@@ -68,31 +73,31 @@ git clone git@git.wanmeizhensuo.com:backend/Mimas.git ...@@ -68,31 +73,31 @@ git clone git@git.wanmeizhensuo.com:backend/Mimas.git
git clone git@git.wanmeizhensuo.com:rank/doris.git git clone git@git.wanmeizhensuo.com:rank/doris.git
``` ```
3. 每个项目checkout到paas分支,build镜像 4. 每个项目checkout到paas分支,build镜像
``` ```
cd 项目目录 cd 项目目录
git checkout paas git checkout paas
docker build --no-cache -t 项目名:local.latest . docker build --no-cache -t 项目名:local.latest .
``` ```
4. 复制 settings_local 到项目目录下 5. 复制 settings_local 到项目目录下
``` ```
cp ./settings_local/backend/settings_local.py /srv/apps/backend/gengmei cp ./settings_local/backend/settings_local.py /srv/apps/backend/gengmei
cp ./settings_local/gaia/settings_local.py /srv/apps/gaia/gaia cp ./settings_local/gaia/settings_local.py /srv/apps/gaia/gaia
cp ./settings_local/mimas/settings_local.py /srv/apps/mimas/settings/settings_local.py cp ./settings_local/mimas/settings_local.py /srv/apps/mimas/settings/settings_local.py
cp ./settings_local/doris/devel.py /srv/apps/doris/doris/devel.py cp ./settings_local/doris/devel.py /srv/apps/doris/doris/devel.py
``` ```
5. docker-for-mac上添加File Sharing配置 /srv/apps、/data/log,添加后点击Apply & Restart,若报错如下,可不必添加。 6. docker-for-mac上添加File Sharing配置 /srv/apps、/data/log,添加后点击Apply & Restart,若报错如下,可不必添加。
![](image/2018-10-25-13-30-29.png) ![](image/2018-10-25-13-30-29.png)
6. 备份之前的路由表,用当前目录下的路由表替换之前的路由表 7. 备份之前的路由表,用当前目录下的路由表替换之前的路由表
``` ```
mv /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json.old mv /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json.old
cp ./static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json cp ./static_route_table.json /etc/gm-config/storage/static.dir/helios.dir/static_route_table.json
``` ```
7. 设置configmap 8. 设置configmap
``` ```
kubectl create configmap static-route-table --from-file=/etc/gm-config/storage/static.dir/helios.dir/static_route_table.json kubectl create configmap static-route-table --from-file=/etc/gm-config/storage/static.dir/helios.dir/static_route_table.json
kubectl create configmap backend-settings --from-file=/srv/apps/backend/gengmei/settings_local.py kubectl create configmap backend-settings --from-file=/srv/apps/backend/gengmei/settings_local.py
...@@ -101,7 +106,7 @@ kubectl create configmap mimas-settings --from-file=/srv/apps/mimas/settings/set ...@@ -101,7 +106,7 @@ kubectl create configmap mimas-settings --from-file=/srv/apps/mimas/settings/set
kubectl create configmap doris-settings --from-file=/srv/apps/doris/doris/devel.py kubectl create configmap doris-settings --from-file=/srv/apps/doris/doris/devel.py
``` ```
8. 部署Pod和Service 9. 部署Pod和Service
``` ```
# Pod # Pod
kubectl create -f deploy/backend-deploy.yml kubectl create -f deploy/backend-deploy.yml
...@@ -115,13 +120,14 @@ kubectl create -f service/mimas-service.yml ...@@ -115,13 +120,14 @@ kubectl create -f service/mimas-service.yml
kubectl create -f service/doris-service.yml kubectl create -f service/doris-service.yml
``` ```
9. 测试服务是否正常 10. 测试服务是否正常
``` ```
kubectl get service -o wide kubectl get service -o wide
``` ```
找到backend-service的PORTS, 如下图就是33254,访问localhost:33254 找到backend-service的PORTS, 如下图就是33254,访问localhost:33254
![](./image/2018-10-25-12-10-56.png) ![](./image/2018-10-25-12-10-56.png)
## 服务调试 ## 服务调试
1. 本地开发,对/srv/apps的服务进行开发 1. 本地开发,对/srv/apps的服务进行开发
......
-----BEGIN CERTIFICATE-----
MIIFiDCCA3ACCQCxX2gQXy/JkjANBgkqhkiG9w0BAQsFADCBgDELMAkGA1UEBhMC
Q04xCzAJBgNVBAgMAkJKMQswCQYDVQQHDAJCSjELMAkGA1UECgwCR00xCzAJBgNV
BAsMAkdNMRwwGgYDVQQDDBNoYXJib3IudGVzdC5nZW5nbWVpMR8wHQYJKoZIhvcN
AQkBFhBvcHNAaWdlbmdtZWkuY29tMB4XDTE4MTAxNzA3NDA1OFoXDTIxMDcxMzA3
NDA1OFowgYoxCzAJBgNVBAYTAkNOMRAwDgYDVQQIDAdCZWlqaW5nMRAwDgYDVQQH
DAdiZWlqaW5nMQswCQYDVQQKDAJHTTELMAkGA1UECwwCR00xHDAaBgNVBAMME2hh
cmJvci50ZXN0LmdlbmdtZWkxHzAdBgkqhkiG9w0BCQEWEG9wc0BpZ2VuZ21laS5j
b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCg5C6+qzYvd7hq8yVx
d/pf40uI7/XdePkwowg0ytSBVD1SAMlnQAaJzg2FCZTeg813Gts+8tpoFMJAB0qn
CG3pbMpmxwOhSLoZSqJNPmvAZWx6P86mYBv6IQA3ryhpUxzQCElATTtaII55m0OW
TAs8cg55f121R5VULWh2RjvDUUqcO6a1w5eMI+Ahi58AM5JJNXsymSyf5Q2+2gMZ
dy9tgQfOkQBgRGvMn1UjHMhiWJOFSmgWjGYbJk30y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5k0TDnbKZvMWnD+Ui04vkE4fWO0ck+K7P1TiVm20pMBN
aljB+PFsHFZaJ4F1W7YLHoFO2ALOxtEOi2cm3Q==
-----END CERTIFICATE-----
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment