|
5 | 5 | echo Usage: ./build \<path to netvirt\> |
6 | 6 | exit 2 |
7 | 7 | fi |
| 8 | +targetpath=${path}/karaf/target |
| 9 | +feature="odl-netvirt-openstack" |
| 10 | +if [[ $1 = *"hwvtepsouthbound"* ]]; |
| 11 | +then |
| 12 | + targetpath="$1/hwvtepsouthbound-karaf/target" |
| 13 | + feature="odl-hwvtepsouthbound-rest" |
| 14 | +elif [[ $1 = *"southbound"* ]]; |
| 15 | +then |
| 16 | + targetpath="$1/southbound-karaf/target" |
| 17 | + feature="odl-southbound-rest" |
| 18 | +elif [[ $1 = *"genius"* ]]; |
| 19 | +then |
| 20 | + feature="odl-genius-rest" |
| 21 | +elif [[ $1 = *"neutron"* ]]; |
| 22 | +then |
| 23 | + feature="odl-neutron-service" |
| 24 | +fi |
8 | 25 |
|
9 | | -wget -O ${path}/karaf/target/assembly/bin/configure_cluster.sh https://raw.githubusercontent.com/opendaylight/integration-distribution/master/karaf/src/main/assembly/bin/configure_cluster.sh |
10 | | -chmod +x ${path}/karaf/target/assembly/bin/configure_cluster.sh |
| 26 | +wget -O ${targetpath}/assembly/bin/configure_cluster.sh https://raw.githubusercontent.com/opendaylight/integration-distribution/master/karaf/src/main/assembly/bin/configure_cluster.sh |
| 27 | +chmod +x ${targetpath}/assembly/bin/configure_cluster.sh |
11 | 28 |
|
12 | 29 | for i in 1 2 3 |
13 | 30 | do |
|
19 | 36 | mkdir -p ${base}/assembly |
20 | 37 | mkdir -p ${base}/workdir |
21 | 38 | mkdir -p ${base}/upper |
22 | | - sudo mount -t overlay overlay -o lowerdir=${path}/karaf/target/assembly,upperdir=${base}/upper,workdir=${base}/workdir ${base}/assembly |
| 39 | + sudo mount -t overlay overlay -o lowerdir=${targetpath}/assembly,upperdir=${base}/upper,workdir=${base}/workdir ${base}/assembly |
23 | 40 |
|
24 | | - sed -i -e 's/\(featuresBoot =.*\)/\1,odl-netvirt-openstack/' ${base}/assembly/etc/org.apache.karaf.features.cfg |
| 41 | + sed -i -e "s/\(featuresBoot =.*\)/\1,${feature}/" ${base}/assembly/etc/org.apache.karaf.features.cfg |
25 | 42 | done |
26 | 43 |
|
27 | 44 | sudo docker build . -t odl |
0 commit comments