Coder Social home page Coder Social logo

wushian / smart_proxy_ipam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grizzthedj/smart_proxy_ipam

0.0 0.0 0.0 65 KB

Foreman Smart Proxy plugin for IPAM integration with various IPAM providers

License: GNU General Public License v3.0

Ruby 100.00%

smart_proxy_ipam's Introduction

smart_proxy_ipam

Foreman Smart Proxy plugin for IPAM integration with various IPAM providers.

Currently supported Providers:

  1. phpIPAM.

Provides a basic Dashboard for viewing phpIPAM sections, subnets. Also supports obtaining of the next available IPv4 address for a given subnet(via IPAM Smart Proxy Plugin).

Installation

See How_to_Install_a_Plugin for how to install Foreman plugins

Usage

Once plugin is installed, you can use phpIPAM to get the next available IP address for a subnet:

  1. Create a subnet in Foreman of IPAM type "External IPAM". Click on the Proxy tab and associate the subnet with a Smart Proxy that has the External IPAM feature enabled. NOTE: This subnet must actually exist in phpIPAM. There is no integration with subnet creation at this time.
  2. Create a host in Foreman. When adding/editing interfaces, select the above created subnet, and the next available IP in the selected subnet will be pulled from phpIPAM, and displayed in the IPv4 address field. NOTE: This is not supported for IPv6.

Local development

  1. Clone the Foreman repo
git clone https://github.com/theforeman/foreman.git
  1. Clone the Smart Proxy repo
git clone https://github.com/theforeman/smart-proxy
  1. Fork both the foreman plugin and smart proxy plugin repos, then clone

foreman_ipam repo: https://github.com/grizzthedj/foreman_ipam
smart_proxy_ipam repo: https://github.com/grizzthedj/smart_proxy_ipam

git clone https://github.com/<GITHUB_USER>/foreman_ipam
git clone https://github.com/<GITHUB_USER>/smart_proxy_ipam
  1. Add the foreman_ipam plugin to Gemfile.local.rb in the Foreman bundler.d directory
gem 'foreman_ipam', :path => '/path/to/foreman_ipam'
  1. From Foreman root directory run
bundle install
bundle exec rails db:migrate
bundle exec rails db:seed    # This adds 'External IPAM' feature to Features table
bundle exec foreman start
  1. Add the smart_proxy_ipam plugin to Gemfile.local.rb in Smart Proxy bundler.d directory
gem 'smart_proxy_ipam', :path => '/path/to/smart_proxy_ipam'
  1. Copy config/settings.d/externalipam.yml.example to config/settings.d/externalipam.yml and replace values with your phpIPAM URL and credentials.
  2. From Smart Proxy root directory run ...
bundle install
bundle exec smart-proxy start
  1. Navigate to Foreman UI at http://localhost:5000
  2. Add a Local Smart Proxy in the Foreman UI(Infrastructure => Smart Proxies)
  3. Ensure that the External IPAM feature is present on the proxy(http://localhost:8000/features)
  4. Create a Subnet, and associate the subnet to the External IPAM proxy

Contributing

Fork and send a Pull Request. Thanks!

Copyright

Copyright (c) 2019 Christopher Smith

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

smart_proxy_ipam's People

Contributors

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