You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
544 B
27 lines
544 B
# prod 机器上
|
|
|
|
## docker build push ,k8s update img
|
|
|
|
```bash
|
|
|
|
CURRENT_VERSION=41
|
|
CURRENT_IMG="me/grid_trader"
|
|
cd /root
|
|
rm -rf grid_trader
|
|
git clone https://mmmm/grid_trader.git
|
|
cd grid_trader
|
|
docker build -t $CURRENT_IMG:$CURRENT_VERSION .
|
|
docker push $CURRENT_IMG:$CURRENT_VERSION
|
|
clear
|
|
echo $CURRENT_VERSION
|
|
|
|
|
|
DEPLOYMENTS=`kubectl -n sre get deployment |grep binance-trader-qy |awk '{print $1}' |xargs`
|
|
for deployment in $DEPLOYMENTS;do
|
|
kubectl set image deployments $deployment *=$CURRENT_IMG:$CURRENT_VERSION -n sre
|
|
done
|
|
|
|
```
|
|
|
|
|