Skip to content

Commit

Permalink
add local cluster to devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkukral committed Oct 2, 2017
1 parent 3aae54c commit 80655c3
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions devenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,28 @@
import requests
import yaml

uuid = 'd3d0404c-202e-42b3-88d6-099abdc3d9e9'
uuid_jenkins = 'd3d0404c-202e-42b3-88d6-099abdc3d9e9'
uuid_local = 'd3d0404c-202e-42b3-88d6-099abdc3d9e0'
kubeconfig_url = 'https://ci.mcp.mirantis.net/job/deploy-aws-k8s_ha_calico/199/artifact/kubeconfig'


try:
cluster = Cluster(
id=uuid_jenkins,
name='testing',
provisioner='Manual',
kubeconfig=yaml.load(requests.get(kubeconfig_url).text),
)
cluster.save()
except:
print('Adding aws cluster failed')


cluster = Cluster(
id=uuid,
name='testing',
id=uuid_local,
name='local_cluster',
provisioner='Manual',
kubeconfig=yaml.load(requests.get(kubeconfig_url).text),
kubeconfig=yaml.load(open('kubeconfig_localhost', 'r').read()),
)
print(cluster.kubeconfig.value)
cluster.save()

0 comments on commit 80655c3

Please sign in to comment.