GithubHelp home page GithubHelp logo

shiwaforce / poco Goto Github PK

View Code? Open in Web Editor NEW
101.0 8.0 6.0 625 KB

Poco will help you to organise and manage Docker, Docker-Compose, Kubernetes, Openshift projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment.

Home Page: https://getpoco.io

License: MIT License

Python 100.00%
docker docker-compose project-compose project-catalog python catalog docker-image docker-container

poco's Introduction

POCO

Build Status pypi pypi Test Coverage Maintainability

Poco helps to organise and manage Docker, Docker-Compose, Kubernetes projects of any complexity using simple YAML config files to shorten the route from finding your project to initialising it in your local environment.

  • Simple. Configure, run and switch between projects with a very simple command line interface.
  • Flexibility. Manage, scale, maintain projects of any complexity with ease.
  • Configure Once, Use Everywhere. Configure project once so the rest of your team will feel the value of zero configuration.

Features

  • Docker, Docker-Compose, Kubernetes, Helm support out of the box.
  • Git, SVN support out of the box.
  • Project Catalog, Multiple Catalogues. Create your own project catalog. Organise and your projects without additional tools.
  • Multiple Plans. Create multiple plans for different environments or even environments for demo purposes. Switch between plans (environments) with ease.
  • Simple Config Files. Poco helps to split config files, so it is easy to maintain and scale them any time.
  • Script Support (Hooks). Add additional scripts any time.

Documentation

All documentation is available on getpoco.io

Requirements

  • Git or SVN
  • SSH
  • Docker (17.0.0 or higher version is recommended)
  • kubectl, for Kubernetes support
  • helm, for helm functionality support

Quick start

Install poco:

$:~ pip install poco

Init project:

$:~ mkdir my-project
$:~ cd my-project
$:~ poco init

poco.yml and docker-compose.yml example files will be created.

Start project:

$:~ poco up

Before adding your project to Poco Repo create new empty git repository, add repository to your local Poco Repo config:

$:~ poco repo add <name> <git-url>

Now you can add you project to repo:

$:~ poco project add [<target-dir>] [<catalog>]

Publish your changes:

$:~ poco repo push

Stop your project:

$:~ poco stop

Licence

MIT Copyright (c) 2017-present, Shiwaforce.com

poco's People

Contributors

antonkovach avatar csabalep avatar dependabot[bot] avatar gaborhorvath avatar gaborkolarovics avatar jimmorrison723 avatar kriszkern avatar laszlolevi avatar sarkiroka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poco's Issues

Disable catalog communication when I not use it

I use poco with catalog, and it is a great feature. But when I use poco with a project which is not in a catalog, then it shoudn't use catalog.
For example when I use with catalog poco up project/plan syntax, it is okay to pull from catalog
But when in a project, I use poco up myplan then it should not pull anything from catalog. Please fix this issue

[FEATURE REQUEST] before_script logging

I would find it very helpful if I could read any form of logging of my commands declared in poco.yml before_script part.

Right now I have no idea if they were executed or not at all.
Did all of them complete correctly?

I wish to see the declared command logged on my terminal for clarity.

[BUG] New version number

If the pip has new version, but the poco dosn't then i get invalid version number.

See it:

(poco) kolarovicsg@Lenovo-14812:~/Private/poco$ pip install poco==
Collecting poco==
Could not find a version that satisfies the requirement poco== (from versions: 0.96.0, 0.96.1, 0.96.2, 0.96.3, 0.96.4, 0.96.5, 0.96.6, 0.96.7, 0.96.8, 0.96.9, 0.96.11, 0.96.12, 0.97.0, 0.97.1, 0.98.0, 0.98.1, 0.99.0, 0.99.1)
No matching distribution found for poco==
You are using pip version 9.0.1, however version 22.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(poco) kolarovicsg@Lenovo-14812:~/Private/poco$ python -m poco.poco -v

New version of poco is available ('9.0.1').
Please upgrade with: pip install -U poco

0.99.1
(poco) kolarovicsg@Lenovo-14812:~/Private/poco$

[FEATURE REQUEST] poco logs select services to show

I would like to be able to select a few of my services and see only their logs in a single terminal.
Right now poco logs <plan> can only print the log for every service in the plan. This is too much, I have many services which produce a lot of (for my current task) irrelevant logs.

Docker compose does this natively, when I type docker-compose logs <service1> <service2>. I would like to have the same functionality with poco logs.

Expected command:

  • poco logs nginx mongodb

Output should be whatever docker-compose logs nginx mongodb would produce.

Git connection check

When going through the catalogue files check to see if the Git URL is available or not. If not skip that entry and move to the next.

Support multiple catalogue files

Currently, all projects are listed in a single file. I would like to use multiple files as catalogues. The tool should process a directory containing catalogue files and use them as a single source list.

poco.yml Rx schema

It would be nice to have a standard schema to validate the poco.yml file

New feature: OS executor

Hello
I use poco very intensively and sometimes I meet a problem: I need some setting, setup step before project start, but it can't be done with before_script because it run in a docker container. So I think good idea a new block (same level with before_script) which can run a script on hostmachine (for example a shell script whitin the current project, or any other command). But I know, it can run on Windows/Mac/Linux, so each command need to mark with OS selector:

# already exist feature
before_script:
  - ./script_in_container.sh

# the new feature
os_executor:
  - ./initial_setup.bat:win
  - ./initial_setup.sh:osx
  - ./initial_setup.sh:linux

What do you think about it? it's like a before start hook - later it can be extended.

[FEATURE REQUEST] poco logs follow flag

I would like to use poco logs to be able to follow the logs of all containers in a poco plan.
Right now poco logs <plan> prints the logs but only once and it won't follow.

Docker compose does this natively, when I type docker-compose logs -f . I would like to have the same functionality with poco.

Please if possible make it possible to add the flag anywhere after the "logs" command, for example:

  • poco logs -f <plan>
  • poco logs <plan> -f
  • poco logs -f // use default plan

Output should be whatever docker-compose does.

project description not up to date

Pocok will help you to organise and manage Docker, Docker-Compose, Kubernetes projects of any
complexity using simple YAML config files to shorten the route from finding your project to initialising it
in your local environment. https://pocok.io

s/Pocok/Proco/g

echo after plan started

when start a complex plan which usage is complex good idea print some instruction into the console. now before_script able to this, but it plan independent and always runs. the other problem with the before_script is the position: it can echos before all of output. i think good flow when started a plan, and developers needs another instrucions it can echos after "docker ps" table.
what do you think about this idea? is it possible?

[BUG] version comparison

The version comparison should be fixed, after 0.100.0 you won't get notifications about new versions

[FEATURE REQUEST] Implement poco run

It would be nice if poco would allow override a specified command to run in a service.

Real-world example is debugging a docker container. Currently - since Poco makes possible to collect environment variables from several files, there is no easy way to run and override command in the docker-compose command section.

I want similar functionality how docker-compose run -f docker/dc-shiwa.yml shiwa bash -l could work, but with the full support of substituting environment variables from the corresponding files.

CLI interface could be poco run PLAN CONTAINER command [args]

[FEATURE REQUEST] Pass arbitrary options to the underlying docker-compose commands

Poco currently has strict option validation with the assistance of the docopt library for each and every command. Docopt handles the parsing of command line arguments and provides help messages in case of wrongly used commands.

It would be great if we could somehow pass any number of arbitrary command line options to the underlying docker-compose command.
Let's take this simple use case: the poco logs command works by calling the docker-compose logs command under the hood, but we cannot pass the switch -f to follow the logs to the poco command, even though the docker-compose command would accept it.
This is a very simple example where this feature would be useful. There are other, more complex poco commands where passing arbitrary options like this is not so straightforward.

The first issue that has to be solved regarding this feature request is that docopt does not allow unknown options to be handled by the program in the current implementation. Identifying and maintaining the list of valid options of docker-compose commands is a huge task, which is not the goal of poco. Poco should not validate these options, let the underlying command do the validation.

Rename "mode" to "plan"

Using "mode" is confusing. When selecting from various options regarding how to run the application the word "plan" better describes the concept.

Project's parent folder cannot be named the same as the project.

Good day to you fellow developers,

Unfortunately, I found a bug I believe.
When I clone a (git) repository with the same name as the parent directory ( for example: /home/${user}/workspace/random/random ) and I try to run poco up ${plan} inside the deeper-random directory it will not recognize it as a git repository, and I get the following

Unexpected error: InvalidGitRepositoryError
('/home/user/workspace/random',)
Run with '-V' for more information.

with the second folder omitted.

Pass offline option to the containers

The offline option is works well, but the containers inside doesn't know about this option setted or not. And the container inside cannot switch between the two state (online or offline).
Please provide this option into the containers. For example env variable, or any other solition is good

Apple will remove scripting languages (python, ruby, etc).

Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won’t be available by default, and may require you to install an additional package. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)

https://developer.apple.com/documentation/xcode_release_notes/xcode_11_beta_7_release_notes

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.