Giter Site home page Giter Site logo

fxpio / tug Goto Github PK

View Code? Open in Web Editor NEW
39.0 4.0 3.0 2.59 MB

Private Composer registry for private PHP packages on AWS Serverless

License: MIT License

JavaScript 11.35% Batchfile 0.73% TypeScript 61.90% HTML 0.63% Vue 22.34% SCSS 3.05%
composer aws-s3 aws-lambda aws-lambda-node php aws-api-gateway aws-cloudformation composer-registries composer-registry-manager github-webhooks

tug's Introduction

Tug

Image of CloudFormation Launch Stack Build Status

Tug is a Composer private registry for private PHP packages installable with Composer (1 and 2). The main idea of this project is to have an intermediary between the management of its own server Packagist, or the use of a third party service, and the simple static packages generator like Satis. That is, do not be worried about updating package versions and SHA1s of the branches, while avoiding the cost of server maintenance and execution, or the high cost of third-party services.

For that, this project is hosted on your AWS account, using API Gateway with Lambda for the serverless code execution, DynamoDB for database, and S3 to storage the cached files, while using webhooks of services to automatically build packages and providers. With the serverless approach, the financial cost is extremely low, see free, and in most cases, only a few cents by month with the AWS Free Tier. You can see the pricing of S3, Lambda, DynamoDB and API Gateway for more details.

Also, this project is not intended to be another complete Packagist server, or a static packages generator like Satis, but bring some interesting features of the Packagist server (automatic update of package definitions) for a very low cost in case you use a third party service like Github or Gitlab to host your private packages, and that the use of VCS repositories makes every Composer update excessively long.

All features can be managed with the Progressive Web Application for desktop and mobile:

PWA screenshots

Features include:

  • Private registry compatible with Composer 1 and 2
  • Deploy the service in a few minutes with Amazon AWS Cloud Formation
  • Fully manage the remote service with the Progressive Web Application or the API Rest
  • Server messages and the Progressive Web Application are localized in multiple languages
  • Authenticate with the AWS IAM Credentials (access key id and secret access key)
  • Available drivers:
    • Github
    • Gitlab
  • Tiggers:
    • create the Composer package definition when the branch or tag is created
    • remove the Composer package definition when the branch or tag is deleted
    • refresh the commit SHA1 on each commit
  • Storage:
    • store the Composer package definitions, API keys and config in the DynamoDB
    • put in cache the package versions and providers in S3
    • track the download count of each package version by Composer
  • API Rest to:
    • configure the server
    • list the repositories
    • enable or disable manually each repositories
    • generate or delete the token used by the Webhooks
    • list the API keys
    • generate or delete an API key
    • list the package versions
    • generate all package definitions for a specific repository
    • show the details of each package version
    • refresh all packages or a specific package version
    • delete all packages or a specific package version
    • clean and rebuild the cache
  • CLI commands to manage the remote service:
    • enable or disable manually each Github repositories
    • enable or disable manually each Gitlab repositories
    • generate or delete the token used by the Github Webhooks
    • generate or delete the token used by the Gitlab Webhooks
    • generate or delete an API key
    • generate all package definitions for a specific repository
    • refresh all packages or a specific package version
    • delete all packages or a specific package version
    • show the Github tokens
    • show the Gitlab tokens
  • CLI commands to create and deploy manually:
    • configure interactively the project
    • create or remove the S3 bucket to deploy the code
    • build, package, and deploy automatically the project in AWS API Gateway, Lambda, SQS, DynamoDB, S3, IAM, and Cloud Watch with the Cloud Formation stack
    • remove the project on AWS (but keeping all the data in DynamoDB and S3)
    • serve the server in local for tests
  • All CLI commands use the API Rest of the Server
  • Auto configuration of the CLI tool:
    • authentication can be doing with the AWS Security Token Service (session token) or the AWS IAM Credentials
    • automatically configuration of the AWS credentials if the Shared Credentials File is present on your machine
    • automatically configuration of the AWS regions if the Shared Config File is present on your machine

Documentation

The bulk of the documentation is stored in the doc/index.md file in this project:

Read the Documentation

The latest version of the AWS CloudFormation Stack is to this url:

https://tug-dev.s3.amazonaws.com/latest.template

Installation

All the installation instructions are located in documentation.

License

This project is under the MIT license. See the complete license in the bundle:

LICENSE

About

Tug is a François Pluchino initiative. See also the list of contributors.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

tug's People

Contributors

francoispluchino 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

Watchers

 avatar  avatar  avatar  avatar

tug's Issues

Unable to save credentials

I love the premise of this application. It matches what I'm trying to do exactly, and takes it one step further.

However, when setting this up, I am unable to save my IAM credentials through the admin panel?

I might be too eager and the application isn't deployed completely yet. Is everything OK when CloudFOrmation says "CREATE_COMPLETE" ?

Should I just wait?

When saving it just says "Forbidden".

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.