mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
make-deploy example: run stacks on docker-machines
(c) Copyright IBM Corp. 2015
This commit is contained in:
27
examples/make-deploy/softlayer.makefile
Normal file
27
examples/make-deploy/softlayer.makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
|
||||
softlayer-vm: export SOFTLAYER_CPUS?=4
|
||||
softlayer-vm: export SOFTLAYER_DISK_SIZE?=100
|
||||
softlayer-vm: export SOFTLAYER_MEMORY?=4096
|
||||
softlayer-vm: export SOFTLAYER_REGION?=wdc01
|
||||
softlayer-vm: check
|
||||
@test -n "$(NAME)" || \
|
||||
(echo "ERROR: NAME not defined (make help)"; exit 1)
|
||||
@test -n "$(SOFTLAYER_API_KEY)" || \
|
||||
(echo "ERROR: SOFTLAYER_API_KEY not defined (make help)"; exit 1)
|
||||
@test -n "$(SOFTLAYER_USER)" || \
|
||||
(echo "ERROR: SOFTLAYER_USER not defined (make help)"; exit 1)
|
||||
@test -n "$(SOFTLAYER_DOMAIN)" || \
|
||||
(echo "ERROR: SOFTLAYER_DOMAIN not defined (make help)"; exit 1)
|
||||
@docker-machine create -d softlayer $(NAME)
|
||||
@echo "DONE: Docker host '$(NAME)' up at $$(docker-machine ip $(NAME))"
|
||||
|
||||
softlayer-dns: HOST_NAME:=$$(docker-machine ip $$(docker-machine active))
|
||||
softlayer-dns: check
|
||||
@which slcli > /dev/null || (echo "softlayer cli not found (pip install softlayer)"; exit 1)
|
||||
@test -n "$(NAME)" || \
|
||||
(echo "ERROR: NAME not defined (make help)"; exit 1)
|
||||
@test -n "$(SOFTLAYER_DOMAIN)" || \
|
||||
(echo "ERROR: SOFTLAYER_DOMAIN not defined (make help)"; exit 1)
|
||||
@slcli dns record-add $(SOFTLAYER_DOMAIN) $(HOST_NAME) A $(HOST_NAME)
|
Reference in New Issue
Block a user