Giter VIP home page Giter VIP logo

looking-glass's Introduction

looking-glass

Looking glass is no longer actively maintained.

Build Status Go Report Card Release

Looking Glass is a tool for mirroring objects to Artifactory.

Why would you want to do this?

It is common for vendors to release binaries to an S3 bucket or FTP. To prevent 100's of servers from reaching outside our network during deployments, we had manually copied these binaries to our Artifactory instance. Looking Glass automates this for us, so we know our Artifactory repo is always up to date!

Setup

The latest version of looking-glass can be found on the Releases tab.

First, you'll need to create a "Generic" repository in Artifactory, and ensure you have a user that can write to it.

Second, you'll need to gather up the credentials for the source you'd like to mirror (you'll need them for the config in the next step)

Third, create a looking-glass yaml configuration file that tells it how to talk to the source/destination of the objects (see details below)

Example Configuration:

artifactory:
  url: http://my.artifactory.server/artifactory/
  username: my-artifactory-user
  key: my-artifactory-key
agents:
  - name: my-s3-agent
    artifactory_repo: my-repo-s3
    sleep_duration: 900
    downloader:
      type: s3
      config:
        aws_bucket: my-s3-bucket
        aws_key: my-aws-key
        aws_secret: my-aws-secret
        aws_prefix: my-prefix
        aws_region: us-west-2
  - name: my-github-agent
    artifactory_repo: my-repo-github
    sleep_duration: 900
    downloader:
      type: github
      config:
        github_repo: simplifi/looking-glass
        github_token: my-github-token

artifactory

This is where you tell looking-glass how to talk to your Artifactory server

  • url - The URL to your Artifactory server
  • username - The username to use when authenticating with Artifactory
  • key - The user's key used when authenticating with Artifactory

agents

This is where you tell looking-glass about the agent(s) configuration

  • name - The name of this agent, mainly used in logging
  • artifactory_repo - The name of the Artifactory repo which will be the destination for the mirrored objects
  • sleep_duration - How long to wait before polling the for changes (in seconds)

agents.downloader (s3)

This is where you tell looking-glass how to download objects from s3

  • type - The type of downloader that you with to run (s3 in this case)
  • config.aws_bucket - The bucket from which you wish to mirror
  • config.aws_key - The AWS Key ID to use when authenticating with S3
  • config.aws_secret - The AWS Secret Key to use when authenticating with S3
  • config.aws_prefix - The prefix to mirror from the S3 bucket
  • config.aws_region - The region in which the S3 bucket exists

agents.downloader (github)

This is where you tell looking-glass how to download assets from Github

  • type - The type of downloader that you with to run (github in this case)
  • config.github_repo - The github repo (in the form of owner/repo_name) from which to pull release assets
  • config.github_token - (optional) The token to authenticate with when pulling release assets

Usage

Basic Usage

Looking Glass (Artifactory Mirror)

Usage:
  looking-glass [command]

Available Commands:
  help        Help about any command
  start       Start the Looking Glass agent
  version     Print the version number of looking-glass

Flags:
  -h, --help   help for looking-glass

Use "looking-glass [command] --help" for more information about a command.

To start up the agents:

looking-glass start -c /path/to/your/config.yml

Development

Compiling

make build

Running Tests

To run all the standard tests:

make test

Releasing

This project is using goreleaser. GitHub release creation is automated using Travis CI. New releases are automatically created when new tags are pushed to the repo.

$ TAG=0.1.0 make tag

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.