Giter Club home page Giter Club logo

ec2mdfs's Introduction

A FUSE filesystem for reflecting Amazon EC2 instance metadata (provided
via HTTP) into the VFS.

dependencies: FUSE/Python bindings ("python-fuse" or "fuse-python")

usage: ec2mdfs [-o subtree=path] /mountpoint

The subtree tells the filesystem what path under the EC2 metadata HTTP
service should be reflected at the mountpoint.  The subtree specifies
an API version number, as well as allowing you to reflect only part of
the metadata.  The default is "/latest", which gives the following:
  $ ./ec2mdfs /ec2
  $ ls -lF /ec2
  total 0
  dr-xr-xr-x 2 root root 0 2013-05-12 15:09 dynamic/
  dr-xr-xr-x 2 root root 0 2013-05-12 15:09 meta-data/

You can isolate only the instance metadata with an alternate subtree:
  $ ./ec2mdfs -osubtree=/latest/meta-data /ec2
  $ ls -F /ec2
  ami-id                 instance-id     metrics/         public-keys/
  ami-launch-index       instance-type   network/         reservation-id
  ami-manifest-path      kernel-id       placement/       security-groups
  block-device-mapping/  local-hostname  profile
  hostname               local-ipv4      public-hostname
  instance-action        mac             public-ipv4

ec2msfs may be used as an alternative to calling out to `curl` for instance
metadata.


Here's a useful entry for /etc/fstab:
ec2mdfs     /ec2    fuse    ro,allow_other     0 0

Or, same thing while mounting the metadata directory (disregarding
dynamic data and userdata):
ec2mdfs     /ec2    fuse    ro,allow_other,subtree=/latest/meta-data     0 0

If ec2mdfs is installed in /usr/bin, then "mount /ec2" will work, and
automatic mounts at system startup will mount /ec2 as well.

The allow_other option makes a FUSE filesystem accessible to users other
than the FUSE daemon owner (in this case, root).

ec2mdfs's People

Contributors

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