Skip to content

Instantly share code, notes, and snippets.

@rjminsha
rjminsha / gist:05bc33eca937f99786dc
Created June 21, 2015 04:57
Example creating services in Bluemix
#!/usr/bin/python
#***************************************************************************
# Copyright 2015 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
#********************************************************************************
# Copyright 2014 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjminsha
rjminsha / checkDockerImageName.sh
Created March 19, 2015 13:11
Checks to see if a docker image name is legal. This is good check when setting up build pipelines for containers.
#!/bin/bash
#*******************************************************************************
# Copyright 2015 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjminsha
rjminsha / deploygroup.sh
Last active August 29, 2015 14:15
Sample deploy script for deploying a group of containers to the IBM Container Service
#!/bin/bash
#********************************************************************************
# Copyright 2014 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjminsha
rjminsha / deploy.sh
Last active August 29, 2015 14:15
Deployment script for IBM Container Service. Used as an example script in the Pipeline to aid in continuous deployment of an application.
#!/bin/bash
#********************************************************************************
# Copyright 2014 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjminsha
rjminsha / startRationalDocker
Created October 20, 2014 14:14
Starting Rational Docker Images
# run ucd-server
docker run -d -p 8080:8080 -p 8443:8443 --name=ucd-server leanjazz.rtp.raleigh.ibm.com:5000/ucd-server
# run a clm-server and registry with ucd-server
docker run -d -e UCD_Agent_Name=dockerized-clm -p 9443:9443 -p 9080:9080 --name=clm-server --link=ucd-server:ucdserver leanjazz.rtp.raleigh.ibm.com:5000/clm-simple
#create a ucd agent and register with the ucd-server (default by link to ucd-server)
docker run -d -e UCD_Agent_Name=dockerized-agent-1 --name=ucd-agent-1 --link=ucd-server:ucdserver leanjazz.rtp.raleigh.ibm.com:5000/ucd-agent
Robbie-2014-MacBook-Pro:foo robbie$ git clone https://gist.github.com/d3bc496f01f6221ec0a1.git
Cloning into 'd3bc496f01f6221ec0a1'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
Robbie-2014-MacBook-Pro:foo robbie$ ls
d3bc496f01f6221ec0a1
@rjminsha
rjminsha / setName.sh
Created September 22, 2014 14:49
Sets the name of the terminal in MacOS.
#!/bin/bash
#********************************************************************************
# Copyright 2014 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@rjminsha
rjminsha / RLKSLookup.sh
Created July 24, 2014 15:28
Script to lookup the RLKS ( on Pure Application System ) and configure CLM to connect to the RLKS
#!/bin/sh
#********************************************************************************
# Copyright 2014 IBM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@rjminsha
rjminsha / updateasg.sh
Last active August 29, 2015 14:04
Updates auto-scaling groups for docker micro-scaler
#!/bin/sh
. ./env.sh
usage()
{
echo "Usage: `basename $0` [-a appname] -m minInstances -x maxInstances -d desiredInstances"
echo " -a optional. Defaults to acmeair_webapp. Valid values typically are acmeair_webapp | acmeacir_auth_service"
echo ""
}
asgc_addr=$($docker_cmd inspect --format '{{ .NetworkSettings.IPAddress }}' microscaler)
APP=""