Code Monkey home page Code Monkey logo

Comments (6)

brentm5 avatar brentm5 commented on June 12, 2024

I am not sure if I am following you correctly. You want the ability to specify a service name override. I am not sure if that makes sense since octopus deploy does not even allow you to change the name when you create instances of a tentacle. What does your resource block look like which is not working?

from octopus-deploy-cookbook.

jmcnair51 avatar jmcnair51 commented on June 12, 2024

In you providers.rb you have set the value "service_name = service_name(instance)". As an example this would name my tentacle service "OctopusDeploy Tentacle - WIN-NCHKE839". However, in our environment when the tentacles have been manually setup on the nodes the service name is only "OctopusDeploy Tentacle". This causes an issue when the recipe compiles and checks the not_if block "not_if { ::Win32::Service.exists?(service_name) }" specifically looking for "OctopusDeploy Tentacle - WIN-NCHKE839" which would evaluate as false although the tentacle service is already installed just with a slightly different name like "OctopusDeploy Tentacle". This causes any node that runs this recipe to error out due to the service name being slightly different than is prescribed in your providers.rb file.

from octopus-deploy-cookbook.

brentm5 avatar brentm5 commented on June 12, 2024

In the provider the instance is either passed in or defaulted. So the only way what you are saying could happen is if you did something like this.

octopus_deploy_tentacle 'default' do
  action [:install, :configure]
  instance 'WIN-NCHKE839'
  ...
end

In this example the instance name is being used to create multiple instances of the tentacle on the system. If there is a bug in how this works it would be beneficial to fix it. Currently we do not do that here which is why we haven't really had to go down that code path. If you only have one tentacle instance on the machine you are trying to install you should just not pass in the instance name.

from octopus-deploy-cookbook.

brentm5 avatar brentm5 commented on June 12, 2024

@jmcnair51 Does this answer your question or resolve the issue? If I dont' hear back I am going to close this issue.

from octopus-deploy-cookbook.

jmcnair51 avatar jmcnair51 commented on June 12, 2024

Sorry @brentm5 for the delayed response. Your suggestion did solve my issue, so thank you for your help. For lack of knowledge, I was under the impression that the instance name was a mandatory input. However, it is still possible to have both a service named OctopusDeploy Tentacle and OctopusDeploy Tentacle - Instance Name, so it would make it more flexible to be able to use a wildcard or explicitly define your service name. Thanks again and you can close this.

from octopus-deploy-cookbook.

brentm5 avatar brentm5 commented on June 12, 2024

No problem. Glad I could help!

from octopus-deploy-cookbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.