Comments (5)
We currently do not have that feature and have not started on any code to support it. If you wanted to add it you are more then welcome to. Some of the issues with why we did not add it was because it's not very easy to make it idempotent as we most likely do not want this running on every chef-client run after its successful. The easiest pattern people follow would be to check for a file on disk and run if it didn't exist, However this also has limitations such as if a role changes it might need to be rolled out manually. I also do not know how to directly test that in our current test apparatus but I can provide some help with adding it / getting it merged and rolled out if you want to submit a PR. It might make sense to move it into a different resource, I am not sure.
from octopus-deploy-cookbook.
Are there any plans to add a ':register' action to the tentacle resource? I'd hate to start a pull request if the work is already started.
Listening
"netsh" advfirewall firewall add rule "name=Octopus Deploy Tentacle" dir=in action=allow protocol=TCP localport=10933
Tentacle.exe register-with --instance "Tentacle" --server "http://YOUR_OCTOPUS" --apiKey="API-YOUR_API_KEY" --role "web-server" --environment "Staging" --comms-style TentaclePassive --console
Polling
Tentacle.exe register-with --instance "Tentacle" --server "http://YOUR_OCTOPUS" --name "YOUR_TENTACLE_NAME" --apiKey "API-YOUR_API_KEY" --comms-style "TentacleActive" --server-comms-port "10943" --force --environment "YOUR_TENTACLE_ENVIRONMENTS" --role "YOUR_TENTACLE_ROLES" --console
from octopus-deploy-cookbook.
Thanks, I've started working on this. I've got basic functionality working with polling tentacles.
Idempotency
Leaving a file would work, however I've figured out how to query the octopus server with powershell. I still need to figure out how to convert the script into a chef/ruby library.
Roles
I'm not too worried about that feature at first since you can easily change roles in the web interface. The registration does require that atleast 1 role is defined. Its pretty easy to get/add roles from the api using powershell, so maybe it would leverage a similar approach to the idempotency check to add them.
Testing
Testing this is going to be tricky. I'm thinking of using appvoyer to spin up a windows vm. The octopus server and the tentacle would be installed on the same machine. Matt Wrock documented how to do this here.
The major hurdle with this approach is that you need to have an API key to register a tentacle, and I haven't found any documentation yet how to programmatically generate one.
from octopus-deploy-cookbook.
We actually already test in appveyor for the server install / tentacle install. Currently we do not start the server because it doesn't have a database but I believe appveyor already has databases configured when it initializes. For Appveyor there are scripts which can be run before and after installs so in theory something could be worked out. I am not sure of the best way to setup the tests but it definitely can be done. For now I think its safe to just create a resource that we can test the scripts locally and not include it in tests and worry about that as refactors. The resource would be relatively simple.
Organizationally I am not sure whats the best way to call the resource but that can be easily switched / refined later. I am thinking something like one of these
# If this is the way we run it then I think some of the resource validations will need to be refined.
# Because a version is not needed for this to work but it is for install.
octopus_deploy_tentacle "Instance" do
action :register
environment ['env']
roles ['role']
api_key <api_key>
endpoint <endpoint>
guard_file <file to create if set> # Optional value to save a file for
end
# or there could be a new resource and that would simplify the attributes
octopus_deploy_tentacle_admin "Instance" do
action :register
environment ['env']
roles ['role']
api_key <api_key>
endpoint <endpoint>
guard_file <file to create if set> # Optional value to save a file for
end
from octopus-deploy-cookbook.
from octopus-deploy-cookbook.
Related Issues (20)
- Document database assumptions for server HOT 2
- Error if node name not specified
- Octopus.Server.exe configure --storageConnectionString deprecated
- Allow configuring multiple admins HOT 1
- admin_user only works for LDAP HOT 2
- Octopus.Server.exe configure --webAuthenticationMode "Domain" is deprecated
- Improve readme on limitations of database automation
- Net::HTTPServerException: 403 "Forbidden" during tentacle installation HOT 1
- Tentacle register action does not work with invalid certificates are used HOT 5
- Support Octopus Deploy 4.0.0 HOT 4
- How to always use the latest version of the tentacle HOT 2
- Register tentacle as tenanted deploy HOT 1
- Include a CONTRIBUTING.md file so supermarket doesnt complain
- Include a TESTING.md file so supermarket doesnt complain
- tenated_deployment_participation
- Setting tentacle_name does not seem to have any effect HOT 5
- Supermarket does not contain the latest code. HOT 1
- Remove need for windows cookbook and windows_firewall cookbooks HOT 2
- Change name_attribute to name_property in order to work with Chef 13
- Support workers tentacle types HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octopus-deploy-cookbook.