David K. Bainbridge | 215e024 | 2017-09-05 23:18:24 -0700 | [diff] [blame] | 1 | # Copyright 2017 the original author or authors. |
| 2 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | # you may not use this file except in compliance with the License. |
| 4 | # You may obtain a copy of the License at |
| 5 | # |
| 6 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | # |
| 8 | # Unless required by applicable law or agreed to in writing, software |
| 9 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | # See the License for the specific language governing permissions and |
| 12 | # limitations under the License. |
| 13 | |
| 14 | help: |
| 15 | @echo "Available make targets:" |
| 16 | @echo " image - build the docker image" |
| 17 | @echo " deploy - deploys a sample 3 instance cluster" |
| 18 | @echo " logs - displays the logs of the unum container" |
| 19 | @echo " nodes - ssh to ONOS and display state of nodes in cluster" |
| 20 | @echo " rm - remove the sample 3 instance cluster" |
| 21 | |
| 22 | image: |
| 23 | docker build --rm --tag unum:latest . |
| 24 | |
| 25 | deploy: |
| 26 | docker stack deploy -c docker-compose.yml test |
| 27 | |
| 28 | logs: |
| 29 | docker service logs -f test_cluster_manager |
| 30 | |
| 31 | nodes: |
| 32 | ssh -p 8101 karaf@localhost nodes |
| 33 | |
| 34 | rm: |
| 35 | docker stack rm test |