This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: simpleservice/simpleservice/web | |
routes: | |
simpleservice/simpleservice/simpleservice:1.0.0/web: | |
weight: 100% | |
simpleservice/simpleservice/simpleservice:1.1.0/web: | |
condition: | |
ref: only_firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
node { | |
def nodeHome = tool name: '8.3.0', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation' | |
env.PATH = "${nodeHome}/bin:${env.PATH}" | |
// !! Replace these with your own settings !! | |
def gitRepo = 'https://github.com/magneticio/simpleservice/' | |
def dockerHub = 'https://registry.hub.docker.com' | |
def dockerHubCreds = 'docker-hub-login' | |
def dockerRepo = 'magneticio' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup Azure Container Service with Kubernetes | |
az group create --name myVampResourceGroup --location westeurope | |
az acs create --orchestrator-type kubernetes --resource-group myVampResourceGroup --name myVampK8SCluster --generate-ssh-keys | |
az acs kubernetes install-cli | |
az acs kubernetes get-credentials --resource-group myVampResourceGroup --name myVampK8SCluster | |
# Install Vamp | |
curl -s https://raw.githubusercontent.com/magneticio/vamp.io/master/static/res/v0.9.5/vamp_kube_quickstart.sh | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vamp merge simpleservice:1.1.0 simpleDep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create two blueprint using the Vamp CLI | |
curl -s https://raw.githubusercontent.com/magneticio/simpleservice/master/blueprints/service_100.yml | vamp create blueprint --stdin | |
curl -s https://raw.githubusercontent.com/magneticio/simpleservice/master/blueprints/service_110.yml | vamp create blueprint --stdin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "/vamp/vamp-gateway-agent", | |
"cmd": null, | |
"cpus": 0.2, | |
"mem": 256, | |
"disk": 0, | |
"instances": 1, | |
"acceptedResourceRoles": [ | |
"slave_public" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "/simple-service-1.0.0", | |
"container": { | |
"type": "DOCKER", | |
"docker": { | |
"image": "magneticio/simpleservice:1.0.0", | |
"network": "BRIDGE", | |
"portMappings": [ | |
{ | |
"containerPort": 3000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az group create --name timACI --location eastus | |
az container create --name simpleservice --image magneticio/simpleservice:1.0.0 --resource-group timACI --ip-address public --port 3000 | |
az container show --name simpleservice --resource-group timACI | |
Name ResourceGroup ProvisioningState Image IP:ports CPU/Memory OsType Location | |
------------- --------------- ------------------- ------------------------------ ------------------- --------------- -------- ---------- | |
simpleservice timACI Succeeded magneticio/simpleservice:1.0.0 52.191.116.216:3000 1.0 core/1.5 gb Linux eastus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var install_hook_to = function(obj) { | |
if (obj.hook || obj.unhook) { | |
throw new Error('Object already has properties hook and/or unhook'); | |
} | |
obj.hook = function(_meth_name, _fn, _is_async) { | |
var self = this, | |
meth_ref; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.handler = (event, context, callback) => { | |
for (let i=0; i<30; i++){ | |
console.log(fib(i)) | |
} | |
const result = { | |
"isBase64Encoded": false, | |
"statusCode": 200, | |
"headers": {}, | |
"body": "done" | |
} |