-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy_onos.yaml
32 lines (31 loc) · 1.12 KB
/
deploy_onos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: onos-deployment
spec:
selector:
matchLabels:
app: onos
replicas: 2 # tells deployment to run 5 pods matching the template
template:
metadata:
labels:
app: onos
spec:
containers:
- name: onos
image: onosproject/onos:2.2.0
command: [ "/bin/bash" ]
args: [ "-c", "sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&
apt update &&
apt install sshpass -y &&
echo [Config] Activate openflow app &&
sshpass -p rocks ssh -q -p 8101 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null onos@127.0.0.1 "app activate org.onosproject.openflow" &&
echo [Config] Activate openflow app &&
sshpass -p rocks ssh -q -p 8101 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null onos@127.0.0.1 "app activate org.onosproject.fwd" &&
sleep infinity" ]
ports:
- containerPort: 6653
- containerPort: 8181
# http://localhost:8181/onos/ui
# username and password: onos/rocks