## Create Local Service (建立本機啟動服務的步驟) 🤖 [注意]要先安裝jq,如果有安裝過了,那就可以跳過 ```shell sudo apt-get install jq ``` 1. apply infra-repository的yaml檔,確保所有的infra-repository都run起來,才可往下個步驟 📦 ```shell kubectl apply -f tz/infra-repository.yaml ``` 2. 建立elastic的index 🕹 ```shell ./tz/elastic-init.sh ``` 3. apply infra-log的yaml檔,確保所有的infra-log都run起來,才可往下個步驟 📦 ```shell kubectl apply -f tz/infra-log.yaml ``` 4. 建立confluent的topic 🐣 3.1 打開網頁網址列輸入: http://127.0.0.1:31721 3.2 建立步驟如圖,按著紅框框滑鼠左鍵壓下,要有如圖四這幾個topic,要注意partition的數量要設對 🧐 ![image1](./tz/confluent1.png) ![image2](./tz/confluent2.png) ![image3](./tz/confluent3.png) ![image4](./tz/confluent4.png) 5. apply app的yaml檔,再次確保所有的app都run起來,以及2和3步驟都玩,才可做這個步驟🚀 ```shell kubectl apply -f tz/app.yaml ``` 6. 等待app都run起來,就可以接你們的系統囉 ```shell kubectl get pod --all-namespaces ``` ## Delete Local Service (本機刪除服務的步驟) 1. delete掉所有的服務 🔥 ```shell kubectl delete -f tz/app.yaml kubectl delete -f tz/infra-log.yaml kubectl delete -f tz/infra-repository.yaml ``` 2. 清空儲存區,要等所有服務終止後再清空哦 ⭐️ ```shell rm -rf /var/elastic rm -rf /var/db rm -rf /var/lib/filebeat-data rm -rf /var/ocean ```