mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 04:06:49 +02:00
Updated tutorial VM to 1.14.0
Change-Id: I46842f52e3b3068718fc125c9fbfe80e069151f4
This commit is contained in:
parent
cc0012423b
commit
e7013e96ff
@ -1 +0,0 @@
|
||||
{"name":"default","nodes":[{"id":"172.17.0.4","ip":"172.17.0.4","port":9876},{"id":"172.17.0.2","ip":"172.17.0.2","port":9876},{"id":"172.17.0.3","ip":"172.17.0.3","port":9876}],"partitions":[{"id":3,"members":["172.17.0.2","172.17.0.3","172.17.0.4"]},{"id":2,"members":["172.17.0.2","172.17.0.3","172.17.0.4"]},{"id":1,"members":["172.17.0.2","172.17.0.3","172.17.0.4"]}]}
|
||||
34
tools/tutorials/vm/config/atomix-1.conf
Normal file
34
tools/tutorials/vm/config/atomix-1.conf
Normal file
@ -0,0 +1,34 @@
|
||||
cluster {
|
||||
cluster-id: onos
|
||||
node.id: atomix-1
|
||||
node.address: "172.17.0.2:5679"
|
||||
discovery {
|
||||
type: bootstrap
|
||||
nodes.1 {
|
||||
id: atomix-1
|
||||
address: "172.17.0.2:5679"
|
||||
}
|
||||
nodes.2 {
|
||||
id: atomix-2
|
||||
address: "172.17.0.3:5679"
|
||||
}
|
||||
nodes.3 {
|
||||
id: atomix-3
|
||||
address: "172.17.0.4:5679"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
management-group {
|
||||
type: raft
|
||||
partitions: 1
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
|
||||
partition-groups.raft {
|
||||
type: raft
|
||||
partitions: 7
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
34
tools/tutorials/vm/config/atomix-2.conf
Normal file
34
tools/tutorials/vm/config/atomix-2.conf
Normal file
@ -0,0 +1,34 @@
|
||||
cluster {
|
||||
cluster-id: onos
|
||||
node.id: atomix-2
|
||||
node.address: "172.17.0.3:5679"
|
||||
discovery {
|
||||
type: bootstrap
|
||||
nodes.1 {
|
||||
id: atomix-1
|
||||
address: "172.17.0.2:5679"
|
||||
}
|
||||
nodes.2 {
|
||||
id: atomix-2
|
||||
address: "172.17.0.3:5679"
|
||||
}
|
||||
nodes.3 {
|
||||
id: atomix-3
|
||||
address: "172.17.0.4:5679"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
management-group {
|
||||
type: raft
|
||||
partitions: 1
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
|
||||
partition-groups.raft {
|
||||
type: raft
|
||||
partitions: 7
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
34
tools/tutorials/vm/config/atomix-3.conf
Normal file
34
tools/tutorials/vm/config/atomix-3.conf
Normal file
@ -0,0 +1,34 @@
|
||||
cluster {
|
||||
cluster-id: onos
|
||||
node.id: atomix-3
|
||||
node.address: "172.17.0.4:5679"
|
||||
discovery {
|
||||
type: bootstrap
|
||||
nodes.1 {
|
||||
id: atomix-1
|
||||
address: "172.17.0.2:5679"
|
||||
}
|
||||
nodes.2 {
|
||||
id: atomix-2
|
||||
address: "172.17.0.3:5679"
|
||||
}
|
||||
nodes.3 {
|
||||
id: atomix-3
|
||||
address: "172.17.0.4:5679"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
management-group {
|
||||
type: raft
|
||||
partitions: 1
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
|
||||
partition-groups.raft {
|
||||
type: raft
|
||||
partitions: 7
|
||||
storage.level: disk
|
||||
members: [atomix-1, atomix-2, atomix-3]
|
||||
}
|
||||
25
tools/tutorials/vm/config/cluster-1.json
Normal file
25
tools/tutorials/vm/config/cluster-1.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"node": {
|
||||
"ip": "172.17.0.5",
|
||||
"id": "172.17.0.5",
|
||||
"port": 9876
|
||||
},
|
||||
"storage": [
|
||||
{
|
||||
"ip": "172.17.0.2",
|
||||
"id": "atomix-1",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.3",
|
||||
"id": "atomix-2",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.4",
|
||||
"id": "atomix-3",
|
||||
"port": 5679
|
||||
}
|
||||
],
|
||||
"name": "onos"
|
||||
}
|
||||
25
tools/tutorials/vm/config/cluster-2.json
Normal file
25
tools/tutorials/vm/config/cluster-2.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"node": {
|
||||
"ip": "172.17.0.6",
|
||||
"id": "172.17.0.6",
|
||||
"port": 9876
|
||||
},
|
||||
"storage": [
|
||||
{
|
||||
"ip": "172.17.0.2",
|
||||
"id": "atomix-1",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.3",
|
||||
"id": "atomix-2",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.4",
|
||||
"id": "atomix-3",
|
||||
"port": 5679
|
||||
}
|
||||
],
|
||||
"name": "onos"
|
||||
}
|
||||
25
tools/tutorials/vm/config/cluster-3.json
Normal file
25
tools/tutorials/vm/config/cluster-3.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"node": {
|
||||
"ip": "172.17.0.7",
|
||||
"id": "172.17.0.7",
|
||||
"port": 9876
|
||||
},
|
||||
"storage": [
|
||||
{
|
||||
"ip": "172.17.0.2",
|
||||
"id": "atomix-1",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.3",
|
||||
"id": "atomix-2",
|
||||
"port": 5679
|
||||
},
|
||||
{
|
||||
"ip": "172.17.0.4",
|
||||
"id": "atomix-3",
|
||||
"port": 5679
|
||||
}
|
||||
],
|
||||
"name": "onos"
|
||||
}
|
||||
@ -1,14 +1,23 @@
|
||||
#!/bin/bash
|
||||
export PATH="$PATH:bin:onos/bin"
|
||||
|
||||
# Creates ONOS cluster using ONOS docker images
|
||||
ONOS_IMAGE=onosproject/onos:1.13.1
|
||||
SSH_KEY=$(cut -d\ -f2 ~/.ssh/id_rsa.pub)
|
||||
|
||||
# Create Atomix cluster using Atomix docker image
|
||||
ATOMIX_IMAGE=atomix/atomix:3.0.5
|
||||
for i in {1..3}; do
|
||||
echo "Setting up atomix-$i..."
|
||||
docker container run --detach --name atomix-$i --hostname atomix-$i \
|
||||
--restart=always -v /home/sdn/bin/config:/atomix $ATOMIX_IMAGE \
|
||||
--config /atomix/atomix-$i.conf
|
||||
done
|
||||
|
||||
# Create ONOS cluster using ONOS docker image
|
||||
ONOS_IMAGE=onosproject/onos:1.14.0
|
||||
for i in {1..3}; do
|
||||
echo "Setting up onos-$i..."
|
||||
docker container run --detach --name onos-$i --hostname onos-$i --restart always $ONOS_IMAGE
|
||||
docker exec -i onos-$i /bin/bash -c "mkdir config; cat > config/cluster.json" < $(dirname $0)/cluster.json
|
||||
docker container run --detach --name onos-$i --hostname onos-$i --restart=always $ONOS_IMAGE
|
||||
docker exec -i onos-$i /bin/bash -c "mkdir config; cat > config/cluster.json" < $(dirname $0)/config/cluster-$i.json
|
||||
docker exec -it onos-$i bin/onos-user-key sdn $SSH_KEY >/dev/null 2>&1
|
||||
docker exec -it onos-$i bin/onos-user-password onos rocks >/dev/null 2>&1
|
||||
done
|
||||
@ -26,6 +35,7 @@ function waitForStart {
|
||||
done
|
||||
}
|
||||
|
||||
# Extract the IP addresses of the ONOS nodes
|
||||
OC1=$(docker container inspect onos-1 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
|
||||
OC2=$(docker container inspect onos-2 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
|
||||
OC3=$(docker container inspect onos-3 | grep \"IPAddress | cut -d: -f2 | sort -u | tr -d '", ')
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Destroys ONOS cluster running as ONOS docker images
|
||||
SSH_KEY=$(cut -d\ -f2 ~/.ssh/id_rsa.pub)
|
||||
|
||||
# Destroy the ONOS cluster running as docker images
|
||||
for i in {1..3}; do
|
||||
echo "Destroying onos-$i..."
|
||||
docker stop onos-$i
|
||||
done
|
||||
|
||||
# Destroy Atomix cluster running as docker images
|
||||
for i in {1..3}; do
|
||||
echo "Destroying atomix-$i..."
|
||||
docker stop atomix-$i
|
||||
done
|
||||
|
||||
docker container prune --force
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# Exports the ONOS Tutorial VM into an OVA file for publishing.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
export VER=1.13.1
|
||||
export VER=1.14.0
|
||||
export OVA=/tmp/onos-tutorial-$VER.ova
|
||||
rm -f $OVA
|
||||
vboxmanage export "ONOS Tutorial" --output $OVA --manifest \
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Publishes the ONOS Tutorial OVA file.
|
||||
# -----------------------------------------------------------------------------
|
||||
export VER=1.13.1
|
||||
export VER=1.14.0
|
||||
export OVA=/tmp/onos-tutorial-$VER.ova
|
||||
uploadToS3.py $OVA --secret $AWS_SECRET_ACCESS_KEY --key $AWS_ACCESS_KEY_ID --bucket onos --dest vm/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user