This file contains hidden or 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
| outputs: | |
| kubernetes_info: | |
| description: Kuberenetes master info | |
| value: | |
| url: {concat: ["http://",{ get_attribute: [ master_ip, floating_ip_address ]},":",{ get_property: [ master, master_port ]}]} |
This file contains hidden or 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
| subprocess.Popen(['sudo','nohup','docker','-d','-H','unix:///var/run/docker-bootstrap.sock','-p','/var/run/docker-bootstrap.pid','--iptables=false','--ip-masq=false','--bridge=none','--graph=/var/lib/docker-bootstrap'],stdout=open('/dev/null'),stderr=open('/tmp/docker-bootstrap.log','w'),stdin=open('/dev/null')) |
This file contains hidden or 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
| sudo("set -m;docker -d -H unix:///var/run/docker-bootstrap.sock -p /var/run/docker-bootstrap.pid --iptables=false --ip-masq=false --bridge=none --graph=/var/lib/docker-bootstrap 2> /var/log/docker-bootstrap.log 1> /dev/null </dev/null &",shell=True) |
This file contains hidden or 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
| nodecellar: | |
| type: cloudify.kubernetes.Microservice | |
| properties: | |
| config_path: service.yaml | |
| config_overrides: | |
| - { concat: ["['spec']['containers'][0]['ports'][0]['hostIP']=","'",{ get_property: [ master, ip]},"'"] } | |
| - { concat: ["['spec']['containers'][0]['env'][0]['value']=","'",{ get_input: host_ip},"'"] } | |
| - { concat: ["['spec']['containers'][0]['env'][1]['value']=","'",{ get_property: [ mongod1, port]},"'"] } | |
| relationships: | |
| - type: cloudify.kubernetes.relationships.connected_to_master |
This file contains hidden or 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
| nodecellar: | |
| type: cloudify.kubernetes.Microservice | |
| properties: | |
| config: | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: nodecellar | |
| spec: | |
| restartPolicy: Never |
This file contains hidden or 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
| @workflow | |
| def kube_run(**kwargs): | |
| setfabenv(kwargs) | |
| optstr=buildopts(kwargs,{"dry_run":"dry-run"},{"port":"not _val_ == -1"},["dry_run"],['name','master']) | |
| ctx.logger.info("Running: {}".format(optstr)) | |
| run("./kubectl -s http://localhost:8080 run "+" "+kwargs['name']+optstr) |
This file contains hidden or 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
| master: | |
| type: cloudify.kubernetes.master | |
| properties: | |
| ip: 10.67.79.129 | |
| ssh_username: ubuntu | |
| ssh_keyfilename: /home/ubuntu/dfilppi-kp.pem | |
| minion: | |
| type: cloudify.kubernetes.node |
This file contains hidden or 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
| dbhosts="" | |
| for key,val in ctx.instance.runtime_properties.iteritems(): | |
| if ( key.startswith("mongod_host_")): | |
| dbhosts=dbhosts+val+"," | |
| if len(dbhosts)>0: | |
| dbhosts=dbhosts.rstrip(',') | |
This file contains hidden or 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
| rtkey="mongod_host_{}".format(ctx.target.instance.id) | |
| try: | |
| ctx.source.instance.runtime_properties[rtkey]=rtval | |
| ctx.source.instance.update() | |
| except rest_exceptions.CloudifyClientError as e: | |
| if 'conflict' in str(e): | |
| ctx.operation.retry( | |
| message='Backends updated concurrently, retrying.', | |
| retry_after=random.randint(1,3)) | |
| else: |
This file contains hidden or 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
| joiner: | |
| type: cloudify.nodes.Compute | |
| properties: | |
| install_agent: false | |
| interfaces: | |
| cloudify.interfaces.lifecycle: | |
| configure: | |
| implementation: scripts/mongo/install-pymongo.sh | |
| executor: central_deployment_agent | |
| start: |
NewerOlder