Anybody could give me any pointers on where to start for automatic deployments?
Let’s say I would like every commit to github to be automatically deployed to my staging server?
Anybody could give me any pointers on where to start for automatic deployments?
Let’s say I would like every commit to github to be automatically deployed to my staging server?
You would need some type of continuous integration or continuous delivery server set up.
A lot of people use GitLab’s CI server, or Codeship, or another paid CI/CD service to run Ansible commands on successful commits.
Definitely will look into Gitlab’s CI server. Looks interesting… And free!?!
Thanks!
You ever get this setup? Looking to do the same!
No I did not, yet … haha.
If anyone has I’d love to see a walkthrough of how you did it-- currently working on it myself but only have time here and there.
After setting up the gitlab-ci-multi-runner “shell” on my macos, I am able to trigger a deploy when a commit is pushed to my develop branch. If that can help you start. I’d be curious to see a more complete .gitlab-ci.yml if someone has one to share.
before_script:
- “cd trellis && ansible-galaxy install -r requirements.yml”
deploy_dev:
script: “./deploy.sh production dev.example.com”
only:
- develop
Hey,
It would be nice if someone could make a tutorial on how to setup GitLab CI with Trellis. It would be awesome addition intro Trellis workflow.
Maby someone has links where is enough info about setting it up? I would be willing to create a tutorial for Trellis, maby even a video. Cheers!
We have open sourced our CircleCI config at https://github.com/ItinerisLtd/circleci-orbs-wordpress/blob/74f1609f16c1da5eff872f4ba20525d6ecde7bd4/src/tiller-circleci/orb.yml and the Dockerfile at https://github.com/ItinerisLtd/circleci-orbs-wordpress/blob/74f1609f16c1da5eff872f4ba20525d6ecde7bd4/src/tiller-circleci/Dockerfile You might want to convert them into GitLab CI ones.
Tips: Make sure you setup the SSH keys correctly.
Tips: Make sure you setup the SSH keys correctly.
@TangRufus, regarding your tip to use SSH correctly.
I have added my server private key to CircleCI project settings with a blank hostname but during the deployment it fails due to publickey. I can SSH into the host with the private key and run deployments locally.
Looking at CircleCI documentation (Add additional SSH keys to CircleCI - CircleCI) I’m seeing that I need to add the ssh key fingerprint. How would I do this with this orb?
Thank you.
I recommand using adding a GitHub user key to CircleCI for simplicity.
To do so:
- https://github.com/<your-username>.keys
)Note: Make sure your GitHub user has read access to the trellis repo, the bedrock repo, and other plugin repos (if you composer install
via private github repos)
Recommandation: Create a bot account on GitHub, grant it read access to all the nessary repos. Then, use it as the user on CircleCI.
If you really want to add a specific ssh key on CircleCI,
add_ssh_keys
as the job’s pre-steps
or setup
P.S. I have left Itineirs. If you find any bugs or have suggestions to the orb, please create an issue on https://github.com/ItinerisLtd/tiller-circleci-orb
I am sure the Itineris team is happy to help.
Thanks for the explanation.
I managed to get it working with assigning a public key using the orbs “setup” job. Like this:
workflows:
deploy:
jobs:
- tiller-monorepo-circleci/deploy:
setup:
- add_ssh_keys
name: deploy-staging