Giter Site home page Giter Site logo

nocloud-ds's Introduction

nocloud-ds

nocloud-ds is a HTTP server for NoCloud datasource of cloud-init. It can serve different instance data based on client's IP address.

Installation

Binary releases (linux/amd64 only for now)

See the releases page. Download and extract the archive, and then put the binary into the directory listed in $PATH.

Build from source

Make sure Go distribution is installed, and then run go install.

$ go install github.com/ryot4/nocloud-ds@latest

Usage

At first, prepare the datasource directory and instance data to serve. You can serve different data for different clients by creating directories named after their IP addresses as in the following example.

datasource/
├── 192.168.1.23/  # Data for 192.168.1.23 (no vendor-data)
│   ├── meta-data
│   └── user-data
├── meta-data      # Data for other clients
├── user-data
└── vendor-data

Then, run nocloud-ds. You can specify the listen address and the path to the datasource directory.

$ nocloud-ds -l address:port -d /path/to/datasource

You can also pass parameters with environment variables.

$ NOCLOUD_DS_LISTEN_ADDRESS=address:port NOCLOUD_DS_DIR=/path/to/datasource nocloud-ds

Running behind a reverse proxy

If X-Forwarded-For header is set in the request, the server uses the client address in the header to find instance data.

nocloud-ds's People

Contributors

ryot4 avatar

Stargazers

brenda c cluff avatar

Watchers

James Cloos 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.