{"push_id":786915923,"size":1,"distinct_size":1,"ref":"refs/heads/feature/foundation","head":"c44f7714ef248f151ffec194596ea21c6325bca6","before":"c2028f6603e7955a6994100341633100ffd487ec","commits":[{"sha":"c44f7714ef248f151ffec194596ea21c6325bca6","author":{"email":"29d8abe4c00ac6d494bf4e69036283f118750261@gmail.com","name":"akutz"},"message":"REX-Ray Foundation Improvements\n\nThis patch introduces many improvements to the REX-RAY tool at a core\nlevel in order to lower REX-Ray's barrier of entry to bloggers,\nend-users, systems administrators, and software engineers.\n\nAll changes introduced by this commit should be considered breaking\nchanges and updates to existing documentation is required.\n\nINSTALLATION, SYSV, SYSTEMD SUPPORT\nREX-Ray now includes built-in support for installing itself as a\nservice on Linux distributions that support either SystemV or SystemD\ninitialization systems. This feature has been tested successfully on\nboth CentOS 7 Minial (SystemD) and Ubuntu 14.04 Server (SystemV)\ndistributions.\n\nTo install REX-Ray on a supported Linux distribution, all that is\nrequired now is to download the binary and execute:\n\n        sudo ./rexray service install\n\nWhat does that do? In short the above command will determine if the\nLinux distribution uses systemctl, update-rc.d, or chkconfig to manage\nsystem services. After that the following steps occur:\n\n  1. The path /opt/rexray is created and chowned to root:root with\n     permissions set to 0755.\n\n  2. The binary is copied to /opt/rexray/rexray and chowned to\n     root:root with permissions set to 4755. This is important, because\n     this means that any non-privileged user can execute the rexray\n     binary as root without requiring sudo privileges. For more\n     information on this feature, please read about the Linux kernel's\n     super-user ID (SUID) bit at\n     http://www.tldp.org/HOWTO/Security-HOWTO/file-security.html.\n\n     Because the REX-Ray binary can now be executed with root\n     privileges by non-root users, the binary can be used by non-root\n     users to easily attach and mount external storage.\n\n  3. The directory /etc/rexray is created and chowned to root:root.\n\nThe next steps depends on the type of Linux distribution. However, it's\nimportant to know that the new version of the REX-Ray binary now\nsupports managing its own PID (at /var/run/rexray.pid) when run as a\nservice as well as supports the standard SysV control commands such as\n\"start,\" \"stop,\" \"status,\" and \"restart.\"\n\nFor SysV Linux distributions that use chkconfig or update-rc.d, a\nsymlink of the REX-Ray binary is created in /etc/init.d/ and then\neither \"chkconfig rexray on\" or \"update-rc.d rexray defaults\" is\nexecuted.\n\nModern Linux distributions have moved to SystemD for controlling\nservices. If the \"systemctl\" command is detected when installing\nREX-Ray then a unit file is written to\n/etc/systemd/system/rexray.service with the following contents:\n\n    [Unit]\n    Description=rexray\n    Before=docker.service\n\n    [Service]\n    EnvironmentFile=/etc/rexray/rexray.env\n    ExecStart=/opt/rexray/rexray service start\n    ExecStart=/opt/rexray/rexray service stop\n    KillMode=process\n    Restart=always\n    StartLimitInterval=0\n\n    [Install]\n    WantedBy=docker.service\n\nAdditionally, an environment file (and parent directory) is created at\n/etc/rexray/rexray.env with the contents:\n\n    REXRAY_HOME=/opt/rexray\n\nThe REX-Ray service is not started immediately upon installation. The\ninstall command completes by informing the users that they should visit\nhttp://github.com/emccode/rexray for information on how to configure\nREX-Ray's storage drivers. The text to the users also explains how to\nstart the REX-Ray service once it's configured using the service command\nparticular to the Linux distribution.\n\nSINGLE SERVICE\nThis patch also removes the need for REX-Ray to be configured as\nmultiple service instances in order to provide multiple end-points to\nsuch consumers such as Docker. REX-Ray's backend now supports an\ninternal, modular design which enables it to host multiple module\ninstances of any module, such as the DockerVolumeDriverModule. In fact,\none of the default, included modules is...\n\nADMIN MODULE & REST & USER INTERFACE\nThe AdminModule enables a RESTful interface for managing REX-Ray's\nmodule system as well as provides a UI to view the currently running\nmodules. Simply start the REX-Ray server and then visit the URL\nhttp://localhost:7979 in your favorite browser to see what's loaded. Or\nyou can access either of the currently supported REST URLs:\n\n    http://localhost:7979/r/module/types\n\nand\n\n    http://localhost:7979/r/module/instances\n\nActually, those aren't the *only* two URLs, but the others are for\ninternal users as of this point. However, the source *is* open, so... :)\n\nIf you want to know what modules are available by using the CLI, after\nstarting the REX-Ray service simply type:\n\n    [0]akutz@poppy:rexray$ rexray service module types\n    [\n      {\n        \"id\": 2,\n        \"name\": \"DockerVolumeDriverModule\",\n        \"addresses\": [\n          \"unix:///run/docker/plugins/rexray.sock\",\n          \"tcp://:7980\"\n        ]\n      },\n      {\n        \"id\": 1,\n        \"name\": \"AdminModule\",\n        \"addresses\": [\n          \"tcp://:7979\"\n        ]\n      }\n    ]\n    [0]akutz@poppy:rexray$\n\nTo get a list of the *running* modules you would type:\n\n    [0]akutz@poppy:rexray$ rexray service module instance get\n    [\n      {\n        \"id\": 1,\n        \"typeId\": 1,\n        \"name\": \"AdminModule\",\n        \"address\": \"tcp://:7979\",\n        \"description\": \"The REX-Ray admin module\",\n        \"started\": true\n      },\n      {\n        \"id\": 2,\n        \"typeId\": 2,\n        \"name\": \"DockerVolumeDriverModule\",\n        \"address\": \"unix:///run/docker/plugins/rexray.sock\",\n        \"description\": \"The REX-Ray Docker VolumeDriver module\",\n        \"started\": true\n      },\n      {\n        \"id\": 3,\n        \"typeId\": 2,\n        \"name\": \"DockerVolumeDriverModule\",\n        \"address\": \"tcp://:7980\",\n        \"description\": \"The REX-Ray Docker VolumeDriver module\",\n        \"started\": true\n      }\n    ]\n    [0]akutz@poppy:rexray$\n\nHmmm, you know, the REX-Ray CLI looks a litle different in the above\nexamples, doesn't it? About that...\n\nCOMMAND LINE INTERFACE\nThe CLI has also been enhanced to present a more simplified view up\nfront to users. The commands are now categorized into logical groups:\n\n    [0]akutz@poppy:rexray$ rexray\n    REX-Ray:\n      A guest-based storage introspection tool that enables local\n      visibility and management from cloud and storage platforms.\n\n    Usage:\n      rexray [flags]\n      rexray [command]\n\n    Available Commands:\n      volume      The volume manager\n      snapshot    The snapshot manager\n      device      The device manager\n      driver      The driver manager\n      service     The service controller\n      version     Print the version\n      help        Help about any command\n\n    Flags:\n      -c, --config=\"/home/akutz/.rexray/config.yaml\": The REX-Ray configuration file\n      -d, --debug[=false]: Enables verbose output\n      -?, --help[=false]: Help for rexray\n      -h, --host=\"tcp://127.0.0.1:7979\": The REX-Ray service address\n\n    Use \"rexray [command] --help\" for more information about a command.\n\n    [0]akutz@poppy:rexray$\n\nFor example, this is what happens when the volume command is executed:\n\n    [0]akutz@poppy:rexray$ rexray volume\n\n    Usage:\n      rexray volume [flags]\n      rexray volume [command]\n\n    Available Commands:\n      create      Create a new volume\n      get         Get one or more volumes\n      map         Print the volume mapping(s)\n      path        Print the volume path\n      mount       Mount a volume\n      attach      Attach a volume\n      unmount     Unmount a volume\n      detach      Detach a volume\n      remove      Remove a volume\n\n    Flags:\n      -?, --help[=false]: Help for volume\n\n    Global Flags:\n      -c, --config=\"/home/akutz/.rexray/config.yaml\": The REX-Ray configuration file\n      -d, --debug[=false]: Enables verbose output\n      -h, --host=\"tcp://127.0.0.1:7979\": The REX-Ray service address\n\n    Use \"rexray volume [command] --help\" for more information about a command.\n    [0]akutz@poppy:rexray$\n\nTRAVIS CI SUPPORT\nREX-Ray now supports Travis-CI builds either from the primary REX-Ray\nrepository or via a fork. All builds should be executed through the\nMakefile, which is a Travis-CI default. For the Travis-CI settings\nplease be sure to set the environment variable GO15VENDOREXPERIMENT to\n1.","distinct":true,"url":"https://api.github.com/repos/akutz/rexray/commits/c44f7714ef248f151ffec194596ea21c6325bca6"}]}