in the process of a full automated deployment with several orchestrator.
For example, i’d like to automate creation of mesos and kubernetes environnement and automatically add new host using API as well.
any documentation somewhere that could help me achieving this ?
first sorry to bring back such an old topic, but i didn’t find any solution and i’m banging my head against my desk now - i’m playing with rancher 1.6.15 - no 2.0 yet
I’m trying to do something very similar. I need to extend the default “Cattle” template with services such as route53 & secrets. My understanding is that the most practical way would be to add a custom template with said services enabled and then use the exact same call in the sample above. Just like what i currently do manually when provisionning a new environment.
I’ve been trying to follow what the UI does when creating a template, but so far all i manage to create is an empty template with nothing in it.
What i’m trying to do (using ansible):
find the default Cattle template by hitting /v2-beta/projecttemplates?name=Cattle
extract the list of stacks defined in the result: (__rancher_init_cattle_template.json.data[0].stacks)
retrieve informations about the ‘secrets’ and ‘route53’ stacks (such as GET /v1-catalog/templates/library:infra*route53), pick the defaultVersion url and hit it : (GET __rancher_init_route53_versions.json.versionLinks[__rancher_init_route53_version])
define 2 “stack documents” that i concatenate to the list of stacks in a new json document matching a projectTemplate object:
Use all this data to populate a json doc extracted from what the UI does (using developer tools), and POST /v2-beta/projectemplates
The result is that i get a new template defined but it is totally empty, doesn’t have name nor title and all i can do with it is delete it… i must be missing something, but if you would have a similar example that creates a workable projectTemplate, that would be awesome…