-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path8-leaves-contrail-config.txt
137 lines (127 loc) · 3.56 KB
/
8-leaves-contrail-config.txt
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[root@centos61 contrail-ansible-deployer]# cat config/instances.yaml
provider_config:
bms:
ssh_user: root
ssh_pwd: root
ssh_public_key: /root/.ssh/id_rsa.pub
ssh_private_key: /root/.ssh/id_rsa
domainsuffix: local
ntpserver: 0.centos.pool.ntp.org
instances:
bms1:
provider: bms
roles:
config_database:
config:
control:
analytics:
analytics_database:
webui:
k8s_master:
kubemanager:
vrouter:
VROUTER_GATEWAY: 172.18.183.1
k8s_node:
ip: 192.168.122.61
bms2:
provider: bms
roles:
control:
vrouter:
VROUTER_GATEWAY: 172.18.185.1
k8s_node:
ip: 192.168.122.62
bms11:
provider: bms
roles:
vrouter:
VROUTER_GATEWAY: 172.18.183.1
k8s_node:
ip: 192.168.122.63
contrail_configuration:
CONTROL_NODES: 172.18.183.11,172.18.185.11
CONTRAIL_CONTAINER_TAG: 1910.23
KUBERNETES_CLUSTER_PROJECT: {}
JVM_EXTRA_OPTS: "-Xms128m -Xmx1g"
## COLLECTOR_PORT: 18086
ENCAP_PRIORITY: VXLAN,MPLSoUDP,MPLSoGRE
global_configuration:
CONTAINER_REGISTRY: hub.juniper.net/contrail
CONTAINER_REGISTRY_USERNAME: xxxx
CONTAINER_REGISTRY_PASSWORD: xxxx
[root@centos61 contrail-ansible-deployer]#
[root@centos61 ~]# cat command_servers.yml
---
command_servers:
server1:
ip: 192.168.122.61
connection: ssh
ssh_user: root
ssh_pass: root
sudo_pass: root
ntpserver: 0.centos.pool.ntp.org
registry_insecure: false
container_registry: hub.juniper.net/contrail
container_tag: 1910.23
config_dir: /etc/contrail
contrail_config:
database:
type: postgres
dialect: postgres
password: contrail123
keystone:
assignment:
data:
users:
admin:
password: contrail123
auth_type: basic-auth
insecure: true
client:
password: contrail123
[root@centos61 ~]#
[root@centos61 ~]#
[root@centos61 ~]#
[root@centos61 ~]# cat install-cc.sh
docker pull hub.juniper.net/contrail/contrail-command-deployer:1910.23
docker run -td --net host -e orchestrator=kubernetes -e action=import_cluster -v /root/command_servers.yml:/command_servers.yml -v /root/contrail-ansible-deployer/config/instances.yaml:/instances.yml --privileged --name contrail_command_deployer hub.juniper.net/contrail/contrail-command-deployer:1910.23
[root@centos61 ~]#
[root@centos61 ~]#
[root@centos61 ~]# cat myns1.yaml
apiVersion: v1
kind: Namespace
metadata:
name: myns1
annotations: {
"opencontrail.org/network" : '{"domain":"default-domain", "project": "k8s-default", "name":"vn1"}'
}
[root@centos61 ~]#
[root@centos61 ~]# kubectl create -f myns1.yaml
[root@centos61 ~]# cat first-containers.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: vn1-deployment
labels:
app: vn1-deployment
spec:
replicas: 3
selector:
matchLabels:
app: vn1-deployment
template:
metadata:
labels:
app: vn1-deployment
spec:
containers:
- name: cirros
image: cirros
ports:
- containerPort: 22
tolerations:
- key: "node-role.kubernetes.io/master"
effect: "NoSchedule"
operator: "Exists"
[root@centos61 ~]#
[root@centos61 ~]# kubectl create -f first-containers.yaml -n myns1