i’m trying create machine via rest api, calling through powershell.
according documentation, name , thumbprint of machine needed create machine. try leads either 405 or 500 errors:
$newmachine = @{name='machinename';thumbprint='asdvblsafghkvadc';} | convertto-json $webclient.uploadstring('http://server/octopus/api/machines','post',$newmachine) ### or $newmachine = @{name='machinename';thumbprint='asdvblsafghkvadc';roles='[web-server]';environmentids='[environment-12]'; | convertto-json $webclient.uploadstring('http://server/octopus/api/machines','post',$newmachine) creating environments , editing machines work perfectly, can’t machine creation down.
usually when you're adding tentacle agent server, afterwards you'd want register said tentacle desired octopus server. supply powershell code used such task, it's worth reading the octopus blog post on how create tentacle army. supply powershell , great start on how it.
note: had terrible time of getting tentacles connect after registering octopus server. secret getting working? stop tentacle service , start again.
after rereading post, looks you're trying add tentacle octopus server outside or after tentacle installation itself. can clarify? think @ minimum environmentids , squid requirement well. try adding squid.
Comments
Post a Comment