Git Product home page Git Product logo

deliverytool's Introduction

Delivery-tool

The tool provides artifacts delivery to your local Artifactory storage


There are 4 functions of the Delivery tool:

  • install - read an installation config and install Artifactory to the instance using ansible.
  • pack - read a packing config, download files and docker images using skopeo, create an archive with some structure.
  • upload - unpack the archive, parse an uploading config and the archive structure and upload files to Artifactory instance. Show full and delta size of repositories.
  • show - show space by a repository.

Prerequisites

There are the things that have to be pre-installed on your system

  • Python 3.8 ✅
  • Docker 20.10.7 ✅
  • Docker-compose 1.29.2 ✅
  • Skopeo 1.4.0 ✅
  • Ansible 2.11.1 ✅

User guide

There is an information about Delivery tool usage

  • Set your configurations

    Change config.yaml and artifactory.yaml according to the example below.

  • Specify your credentials for Artifactory instance

    Note, that credentials must be ARTIFACTORY_LOG=admin:ARTIFACTORY_PASS=password for the first Artifactory launch.

  • Run the tool

    Execute delivery-tool-rukavishnikov-0.1.0.pyz with any function


Usage

  • install

    python3 delivery-tool-rukavishnikov-0.1.0.pyz install [-r 1]

    -r is optional, so you can include it, if you need to create Generic repository automatically. Note, that you need to specify default admin/password credentials for install -r True option.

    For the next functions you need to contain create.yaml and artifactory.yaml files in the same directory as delivery-tool-rukavishnikov.pyz

  • pack

    python3 delivery-tool-rukavishnikov-0.1.0.pyz pack

  • upload

    python3 delivery-tool-rukavishnikov-0.1.0.pyz upload

Generic and Docker repositories are required for upload and show functions.

Artifactory UI also requires a manual action in order to push images with skopeo:

  • Go to Artifactory -> General -> HTTP Settings
  • Choose port as Docker Access Method
  • Choose nginx as Server Provider
  • Specify localhost as Internal Hostname and Public Server Name
  • Specify HTTP Port (17001 according to my example)

Don't forget to export your new credentials, do:

export ARTIFACTORY_LOG=<your login>
export ARTIFACTORY_PASS=<your new password>
  • show

    python3 delivery-tool-rukavishnikov-0.1.0.pyz show


The example of config.yaml

   files:
   - https://docker.bintray.io/artifactory/bintray-tools/com/jfrog/bintray/client/api/0.2/api-0.2.jar
   - https://docker.bintray.io/artifactory/jfrog-cli/v1/1.0.0/jfrog-cli-linux-386/jfrog
   images:
   - docker.bintray.io/jfrog/artifactory-pro:7.19.8
   - docker.bintray.io/postgres:13.2-alpine
   - docker.bintray.io/jfrog/nginx-artifactory-pro:7.19.8

You need to specify file URLs in files section and Docker images in images section according to the example above


The example of artifactory.yaml

   url: http://10.0.2.15:8082/artifactory
   docker_registry: 10.0.2.15:17001
   repositories:
     files: delivery_tool.files
     docker: delivery-tool.docker
   home_dir: /home/mikhail/.jfrog
   lic_path: /home/mikhail/artifactory.lic

This configuration file needs to contain the Artifactory URL specified in url section and docker registry. In repositories section there should be a Generic repository name in files and Docker repository name in docker. lic_path is a path to your artifactory.lic file, that contains Artifactory license key. Besides, please, specify the Docker images in images section and your Artifactory home directory in home_dir.


deliverytool's People

Contributors

rukavishnikovmihail00 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.