Giter Club home page Giter Club logo

chassis_apt_proxy's Introduction

APT Proxy for Chassis

Mini extension to set an APT proxy for your Chassis box.

If you have an APT proxy running locally or in your local network, this extension allows you to connect to it to speed up provisioning, as all packages will be loaded from the proxy cache.

Tested and fully working with Apt-Cacher NG

Installation

Either...

Add this extension to your config.local.yaml:

extensions:
  - noplanman/chassis_apt_proxy

or...

Clone this repository into your Chassis extensions directory:

# In your Chassis root directory
$ cd extensions
$ git clone https://github.com/noplanman/chassis_apt_proxy

Configuration

Add a new section to your config.local.yaml:

apt_proxy:
  file: 01proxy                # File name to use when saving to /etc/apt/apt.conf.d (default: 01proxy)
  http: http://127.0.0.1:3142  # HTTP address to your cache proxy (default: false)
  https: false                 # HTTPS address to your cache proxy (default: false)

To remove any previously added proxy, just leave the single http value blank and provision your box. Only then can you remove the config and extension:

apt_proxy:
  http:

Now simply provision your box:

$ vagrant up --provision

TOTAL APT proxy

Since this is a puppet extension for Chassis, it will only be loaded after the initial preprovision script has executed, meaning that the initial APT package installation is unproxied. If you want those to be proxied too, you will have to add some code to puppet/preprovision.sh:

# -snip- #

  # Remove temp files
  rm /tmp/mirrors-sources.list /tmp/apt-sources.list
fi

# Add APT proxy
echo 'Acquire::http::Proxy "http://your-proxy:3142";' > /etc/apt/apt.conf.d/01proxy
echo 'Acquire::https::Proxy "false";' >> /etc/apt/apt.conf.d/01proxy

# Update apt
sudo apt-get update

# -snip- #

chassis_apt_proxy's People

Contributors

noplanman avatar

Stargazers

 avatar

Watchers

 avatar  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.