-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable path #55
Comments
You can create a bash script or a script in another scripting language to trigger an application or events for certain files. Pico's job is to deploy services, but that doesn't have any affect on how your files are stored. Could you please give a better explanation as to your situation? |
Using a custom script inside the target repo was my first idea, but I see a limit in the config repo setup. Let's have a lot of VMs to handle in this way.. you will have so many repos with at least one js file. Thanks |
That isn't really the goal of this repo. The idea is that you have one master repo that configures how each deployment works. You can then specify which services (aka repos) are deployed into which machine. For example my master repo, deploys on to 2 dedicated servers, a local dev server and 8 VM's. I configure my repos to be independent of each other so that all they need is a single place of execution, which is what pico is designed to do as of right now. I doubt this will change much. You can specify the HOSTNAME to be passed into pico to determine in the configuration file what services should be deployed to that machine. You can also use HOSTNAME variables inside deployed services themselves, so you could have a bash script that checks that HOSTNAME and runs a certain set of scripts if that is what you desire. But other then that, I'm not sure this request is best suited for this tool, since that would go in the opposite direction of what pico was designed for. |
So you have 11 config repos that contains in master branch at least one js file with the T function that points to one or more target repos and pico will execute something different matching (for example) the HOSTNAME. Right? I don't see a big difference in storing a js file inside a folder instead of a different repo. I'm a big fan of GitOps on k8s (in production I use argoCD), I would like to use pico to create something similar for docker engine scenario. Another question about config: can I access to the env variables inside the JS file? Have you created a slack channel or something else to talk about pico? |
Taking a recent deployment case from Southclaws's deployments, this is an example of how you can use the configuration file to specify repos to deploy from (I have removed some stuff that might be a little revealing to server names and repos)
This config uses docker-compose to up and down repositories that are used for his deployment. It takes advantage of the hostname to determine which server pulls which repo, this is how pico was deigned to work. You don't need multiple config files for this, especially if they all use the same executor, but even if they don't you can always create a function that can be used to make the process easier. any env variables you pass to Pico will be available in your configuration file. Both Southclaws and I mainly use Discord. JustMichael#7884 (This is me) |
This sounds like a simple and easy thing to implement tbh. I'm strongly against scripts and prefer declarative approaches to problems. Currently, my config repo has Pico configs but also some other stuff in there and I could imagine more JS files being added at some point for systems like dnscontrol (which is currently in another repo, but I'd like to consolidate). A possible solution to this could be a regular expression to match filenames. This could allow you to selectively load configuration from directories or from files that follow a certain naming convention such as Thanks for your interest in this project too! It's early days but I'm hoping it can be useful! |
Also, I'm aiming to get a community hub set up soon, I'm working on documentation at https://pico.sh currently and it's mostly just me working on it at the moment with @ADRFranklin helping out with testing and stuff. |
I've written up the first batch of documentation on https://pico.sh now so if you're still interested in this project, check it out! |
Hi, I strongly suggest to add a custom subpath definition for both "config" and "target" repo.
I would like to organize *.js and *.yml files in subdirectories and not store them in the root folder.
For example let's think about a config repo that contains configuration for many vms.
The text was updated successfully, but these errors were encountered: