Coder Social home page Coder Social logo

roll's Introduction

roll - bootstrap or upgrade a Unix host with Roller

This is the source code for the roll command line program, the part of the Roller automated host management system which runs on a host, reads hostclass and host YAML files from a Roller config server, and then applies the changes locally to bring up or upgrade the local host.

Getting Started

To build roll from source:

./build.sh

Roller should build on any reasonably recent Unix system with a GNU autoconf and gcc compilation stack, plus the libcurl and libyaml libraries.

To bootstrap or upgrade a Unix host (assuming you have a Roller configuration server available at http://config/), run the following as superuser on the host to be upgraded:

./roll

Description

Roller is a host management system which arranges for software packages and configuration files to be installed on a host in a reliable, repeatable, and source controlled way. The following major components comprise Roller:

  • A data repository, with source controlled host and hostclass definitions
  • Static, precompiled software packages
  • A configuration server, with APIs to the read data and download packages
  • The roll program, which uses the above to actually bootstrap a host

The roll program is the latter: it contacts a configuration server, asks for host and hostclass definitions for the host that it is running on, downloads and links packages according to the hostclass definition, and then runs package hooks to generate configuration files and restart services.

Roller uses Encap for its local host package management, and Git managed YAML files for host and hostclass definitions.

License

Copyright (c) 2013, Groupon, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

Neither the name of GROUPON nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Meta

Prior Art

There are a number of existing host management solutions. The very popular current ones are:

Roller differs from these in its emphasis on simplicity and repeatability, for example, by keeping all host and hostclass data in static files, using prebuilt static packages that are locally served, and striving to minimize the amount of deploy-time code that is run.

roll's People

Contributors

andrewgho avatar erikdw avatar koppenheim avatar richievos avatar tomdz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

roll's Issues

invalid pointer when not passing any parameter.

Might be related to #11

$ /var/tmp/roll
You must have root privileges to run this command.
*** glibc detected *** /var/tmp/roll: free(): invalid pointer: 0x00007fff05942918 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75e66)[0x7f1a3378be66]
/var/tmp/roll[0x4095f6]
/var/tmp/roll[0x40cee7]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f1a33734d5d]
/var/tmp/roll[0x4087a9]
======= Memory map: ========
00400000-005d6000 r-xp 00000000 08:03 269381 /var/tmp/roll
007d6000-007ff000 rwxp 001d6000 08:03 269381 /var/tmp/roll
007ff000-00804000 rwxp 00000000 00:00 0
01a22000-01a43000 rwxp 00000000 00:00 0 [heap]
7f1a33500000-7f1a33516000 r-xp 00000000 08:03 2490576 /lib64/libgcc_s-4.4.7-20120601.so.1
7f1a33516000-7f1a33715000 ---p 00016000 08:03 2490576 /lib64/libgcc_s-4.4.7-20120601.so.1
7f1a33715000-7f1a33716000 rwxp 00015000 08:03 2490576 /lib64/libgcc_s-4.4.7-20120601.so.1
7f1a33716000-7f1a338a0000 r-xp 00000000 08:03 2490381 /lib64/libc-2.12.so
7f1a338a0000-7f1a33aa0000 ---p 0018a000 08:03 2490381 /lib64/libc-2.12.so
7f1a33aa0000-7f1a33aa4000 r-xp 0018a000 08:03 2490381 /lib64/libc-2.12.so
7f1a33aa4000-7f1a33aa5000 rwxp 0018e000 08:03 2490381 /lib64/libc-2.12.so
7f1a33aa5000-7f1a33aaa000 rwxp 00000000 00:00 0
7f1a33aaa000-7f1a33ac1000 r-xp 00000000 08:03 2490405 /lib64/libpthread-2.12.so
7f1a33ac1000-7f1a33cc1000 ---p 00017000 08:03 2490405 /lib64/libpthread-2.12.so
7f1a33cc1000-7f1a33cc2000 r-xp 00017000 08:03 2490405 /lib64/libpthread-2.12.so
7f1a33cc2000-7f1a33cc3000 rwxp 00018000 08:03 2490405 /lib64/libpthread-2.12.so
7f1a33cc3000-7f1a33cc7000 rwxp 00000000 00:00 0
7f1a33cc7000-7f1a33cc9000 r-xp 00000000 08:03 2490387 /lib64/libdl-2.12.so
7f1a33cc9000-7f1a33ec9000 ---p 00002000 08:03 2490387 /lib64/libdl-2.12.so
7f1a33ec9000-7f1a33eca000 r-xp 00002000 08:03 2490387 /lib64/libdl-2.12.so
7f1a33eca000-7f1a33ecb000 rwxp 00003000 08:03 2490387 /lib64/libdl-2.12.so
7f1a33ecb000-7f1a33ed2000 r-xp 00000000 08:03 2490409 /lib64/librt-2.12.so
7f1a33ed2000-7f1a340d1000 ---p 00007000 08:03 2490409 /lib64/librt-2.12.so
7f1a340d1000-7f1a340d2000 r-xp 00006000 08:03 2490409 /lib64/librt-2.12.so
7f1a340d2000-7f1a340d3000 rwxp 00007000 08:03 2490409 /lib64/librt-2.12.so
7f1a340d3000-7f1a340f3000 r-xp 00000000 08:03 2490584 /lib64/ld-2.12.so
7f1a342e3000-7f1a342e7000 rwxp 00000000 00:00 0
7f1a342f0000-7f1a342f2000 rwxp 00000000 00:00 0
7f1a342f2000-7f1a342f3000 r-xp 0001f000 08:03 2490584 /lib64/ld-2.12.so
7f1a342f3000-7f1a342f4000 rwxp 00020000 08:03 2490584 /lib64/ld-2.12.so
7f1a342f4000-7f1a342f5000 rwxp 00000000 00:00 0
7fff05923000-7fff05944000 rwxp 00000000 00:00 0 [stack]
7fff059aa000-7fff059ac000 r--p 00000000 00:00 0 [vvar]
7fff059ac000-7fff059ae000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

Freeing an invalid pointer

when passing in a hostclass file that does not exist roll tries to deallocate an invalid pointer :

[2015-10-23 17:52:24 UTC] Unable to open /tmp/hostclass.: No such file or directory
*** glibc detected *** /var/tmp/roll: free(): invalid pointer: 0x00007fff4b79b6e8 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76166)[0x7f22e704c166]
/var/tmp/roll[0x4095f6]
/var/tmp/roll[0x40cee7]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f22e6ff4d1d]
/var/tmp/roll[0x4087a9]
======= Memory map: ========
00400000-005d6000 r-xp 00000000 fc:03 391580                             /var/tmp/roll
007d6000-007ff000 rwxp 001d6000 fc:03 391580                             /var/tmp/roll
007ff000-00804000 rwxp 00000000 00:00 0
00aa7000-00ac8000 rwxp 00000000 00:00 0                                  [heap]
7f22e6792000-7f22e67a8000 r-xp 00000000 fc:03 521219                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f22e67a8000-7f22e69a7000 ---p 00016000 fc:03 521219                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f22e69a7000-7f22e69a8000 rwxp 00015000 fc:03 521219                     /lib64/libgcc_s-4.4.7-20120601.so.1
7f22e69a8000-7f22e69be000 r-xp 00000000 fc:03 521259                     /lib64/libresolv-2.12.so
7f22e69be000-7f22e6bbe000 ---p 00016000 fc:03 521259                     /lib64/libresolv-2.12.so
7f22e6bbe000-7f22e6bbf000 r-xp 00016000 fc:03 521259                     /lib64/libresolv-2.12.so
7f22e6bbf000-7f22e6bc0000 rwxp 00017000 fc:03 521259                     /lib64/libresolv-2.12.so
7f22e6bc0000-7f22e6bc2000 rwxp 00000000 00:00 0
7f22e6bc2000-7f22e6bc7000 r-xp 00000000 fc:03 521247                     /lib64/libnss_dns-2.12.so
7f22e6bc7000-7f22e6dc6000 ---p 00005000 fc:03 521247                     /lib64/libnss_dns-2.12.so
7f22e6dc6000-7f22e6dc7000 r-xp 00004000 fc:03 521247                     /lib64/libnss_dns-2.12.so
7f22e6dc7000-7f22e6dc8000 rwxp 00005000 fc:03 521247                     /lib64/libnss_dns-2.12.so
7f22e6dc8000-7f22e6dd4000 r-xp 00000000 fc:03 521249                     /lib64/libnss_files-2.12.so
7f22e6dd4000-7f22e6fd4000 ---p 0000c000 fc:03 521249                     /lib64/libnss_files-2.12.so
7f22e6fd4000-7f22e6fd5000 r-xp 0000c000 fc:03 521249                     /lib64/libnss_files-2.12.so
7f22e6fd5000-7f22e6fd6000 rwxp 0000d000 fc:03 521249                     /lib64/libnss_files-2.12.so
7f22e6fd6000-7f22e7161000 r-xp 00000000 fc:03 521233                     /lib64/libc-2.12.so
7f22e7161000-7f22e7360000 ---p 0018b000 fc:03 521233                     /lib64/libc-2.12.so
7f22e7360000-7f22e7364000 r-xp 0018a000 fc:03 521233                     /lib64/libc-2.12.so
7f22e7364000-7f22e7365000 rwxp 0018e000 fc:03 521233                     /lib64/libc-2.12.so
7f22e7365000-7f22e736a000 rwxp 00000000 00:00 0
7f22e736a000-7f22e7381000 r-xp 00000000 fc:03 521257                     /lib64/libpthread-2.12.so
7f22e7381000-7f22e7581000 ---p 00017000 fc:03 521257                     /lib64/libpthread-2.12.so
7f22e7581000-7f22e7582000 r-xp 00017000 fc:03 521257                     /lib64/libpthread-2.12.so
7f22e7582000-7f22e7583000 rwxp 00018000 fc:03 521257                     /lib64/libpthread-2.12.so
7f22e7583000-7f22e7587000 rwxp 00000000 00:00 0
7f22e7587000-7f22e7589000 r-xp 00000000 fc:03 521239                     /lib64/libdl-2.12.so
7f22e7589000-7f22e7789000 ---p 00002000 fc:03 521239                     /lib64/libdl-2.12.so
7f22e7789000-7f22e778a000 r-xp 00002000 fc:03 521239                     /lib64/libdl-2.12.so
7f22e778a000-7f22e778b000 rwxp 00003000 fc:03 521239                     /lib64/libdl-2.12.so
7f22e778b000-7f22e7792000 r-xp 00000000 fc:03 521261                     /lib64/librt-2.12.so
7f22e7792000-7f22e7991000 ---p 00007000 fc:03 521261                     /lib64/librt-2.12.so
7f22e7991000-7f22e7992000 r-xp 00006000 fc:03 521261                     /lib64/librt-2.12.so
7f22e7992000-7f22e7993000 rwxp 00007000 fc:03 521261                     /lib64/librt-2.12.so
7f22e7993000-7f22e79b3000 r-xp 00000000 fc:03 521226                     /lib64/ld-2.12.so
7f22e7ba9000-7f22e7bad000 rwxp 00000000 00:00 0
7f22e7bae000-7f22e7bb2000 rwxp 00000000 00:00 0
7f22e7bb2000-7f22e7bb3000 r-xp 0001f000 fc:03 521226                     /lib64/ld-2.12.so
7f22e7bb3000-7f22e7bb4000 rwxp 00020000 fc:03 521226                     /lib64/ld-2.12.so
7f22e7bb4000-7f22e7bb5000 rwxp 00000000 00:00 0
7fff4b787000-7fff4b79d000 rwxp 00000000 00:00 0                          [stack]
7fff4b7ff000-7fff4b800000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Delete downloaded package if bad

When roll is downloading and unpacking packages, it occasionally gets an incomplete tarball. If this is the case, roll will fail, but will leave the bad package in the download directory. Future runs will avoid downloading because the (bad) package is on the download directory.

A failed un-tar should cause roll to delete the bad package.

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.