Comments (16)
It could be waiting on something.
Can you explain what /etc/ansible
file does?
As far as I know, semaphore assembles the inventory on its own
from semaphore.
Nothing special, I just added in file hosts
file one local host to check how ansible+semaphore works. I didnt change ansible.cfg
too. Think there could be a mistake with ssh keys in identities, though I put the same private and public keys.
Generally what does the semaphore use for task running?
from semaphore.
This runs all things ansible related: runner.js
It spawns sub processes -- nothing special.
from semaphore.
I read it, think there might be a problem with SSH keys checking. I`ve regenerated SSH key and put it in identity, but result is the same. Do you know occasionally, what can I do to solve it?
from semaphore.
Hmm for starters i dont think you should be needing to modify anything aside from inside of semaphore.
You could try and manually ssh into the target host, it might be that its git waiting for an interaction to connect to an unknown ssh host (there is a wrapper used for it, but it might not be working in this case perhaps)
from semaphore.
That`s the point, now I just have one host with Ansible and Semaphore and who should be target during the time, when semaphore runs. And SHH key on this host is the same that I put in semaphore identity.
from semaphore.
I was stuck at the same point (report only says it updated the keys) as you but went to runner.js and added some debug lines to the errors and found out that there were some missing files due to HOME env var not being defined.
My experience, installing semaphore in a ubuntu 14.04 VM (last weekend) which may be helpfull:
- Cloned semaphore under /opt
- Installed ansible 1.9.1 (followed the instructions in https://www.michaelrigart.be/en/blog/testing-ansible-roles-with-semaphore.html)
- playbooks/playbook.yml locally
- chown -R semphore:semaphore /opt/semaphosre
- Edit /opt/semaphore/runit_semaphore/run so it has the HOME env set in the command line to /root
I had to hardcode HOME to /root since the node app seemed to be run as root and I don't know why the process wasn't inheriting HOME var from shell
It would be nice if we get a way of making the node app being run as semaphore user instead of root but due to my lack of knowledge of 'runit' I wasn't able yet
from semaphore.
@carlos-alarcon /root is currently hard-coded into the executor (runner.js file) as it was intended to be ran inside docker / environment where semaphore is the only thing. Obviously not well designed, but that will change in upcoming versions of the API
from semaphore.
@matejkramny seems that '/root' is not hardcoded in runner.js any more:
var home = process.env.HOME + '/';
Anyway, in my machine, somehow the /opt/semaphore/runit_semaphore/run wasn't inherinting HOME enviroment variable (perhaps a 'runit' stuff, i never used 'runit' before so can't tell). So I edited /opt/sempahore/runit_semaphore/run to be like:
`#!/bin/bash
cd /opt/semaphore/
HOME=/root PORT=3000 node bin/semaphore.js`
which solved my problem (of not being able to run tasks). I guess that if i manage this /etc/semaphore/runit_semaphore/run to be launched by 'semaphore' user then it would still work but using other folders (HOME=/home/semaphore) for the playbooks.
from semaphore.
Hmm I don't know what runit
is either, but from experience with process managers, they sometimes don't inherit outside environment to the process unless explicitly directed.
from semaphore.
@matejkramny Does semaphore download all the playbook from git and store it in some location when running as docker?
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b29051cc8349 castawaylabs/semaphore "node /srv/semaphore/" 45 hours ago Up 45 hours 0.0.0.0:80->80/tcp semaphore
ba4f55661d2c mongo "/entrypoint.sh mongo" 45 hours ago Up 45 hours 127.0.0.1:27017->27017/tcp mongodb
7b0428cf86a8 redis "/entrypoint.sh redis" 46 hours ago Up 46 hours 6379/tcp redisio
I am looking a way to find out how the playbook is getting called? will it be called from within docker container that's running semaphore? I was able to bring up the GUI and add ssh keys but for some reason the ssh to my remote machines where playbook needs to run are failing.
Please suggest.
from semaphore.
It gets called when you run the job. Specifically look at lib/runner.js
.
It downloads the playbook every time and then gets rid of it. Playbooks are downloaded to $HOME/
from semaphore.
@matejkramny Does semaphore downloads only the playbook or it will download my entires files / folders from the git repo? like all the roles, inventory files etc...
from semaphore.
It will download the entire git repo, then tell ansible to use the playbook file
from semaphore.
I have a related question. I am trying to run semaphore on AWS in an EC2 instance. My github is behind the corporate firewall. I am having difficulty getting the SSH stuff set up. I have added the proxy info in the run file but it is not even trying to hit the github repo. I would also like to find a way to use one set of SSH keys to connect to github and a different set to connect to the EC2 instances I am trying to manage. Any thoughts?
Tim
from semaphore.
@tbynum please create a separate issue
from semaphore.
Related Issues (20)
- Problem: Container is not starting after getting v2.9.109 with Error Messages HOT 8
- Problem: Integration endpoint not triggering task template HOT 3
- Problem: Unable to authenticate with LDAP in v2.9.109 HOT 5
- Feature: show current cli arg task run screen
- Problem: Zombie processes on host after in update 2.9.109 HOT 2
- Problem: Authentik OIDC HOT 2
- Error cloning http repository HOT 4
- Problem: ssh-agent 'bind: address already in use' HOT 5
- Problem: Semaphore doesn't reads `ansible.cfg` HOT 16
- Problem: Installation of Python Modules via requirements.txt doesnt seem to work as intended HOT 4
- Problem: The size of the Docker images has grown massively since >= v2.9.92 HOT 8
- Problem: web_host missing in slack alert title_link HOT 1
- Question: implement unconventional cron expressions as schedule
- Problem: connect to LDAP/LDAPS from Docker
- Problem: Current Develop Docker Build breaking SSH Hostkey Checking HOT 4
- Problem: .deb package should depend on ansible HOT 4
- Feature: Ability to assign multiple inventories to a task template
- Problem: slack environment variables are not working for docker HOT 1
- Problem: incorrect task link in email alerts
- Problem: After updating to v2.10.2: "Permission denied (publickey,password)" HOT 14
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 semaphore.