Download the PHP package shift31/hostbase without Composer

On this page you can find all versions of the php package shift31/hostbase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hostbase

Hostbase

A highly scalable host and network database with full-text search and a RESTful API

Hostbase is currently under development, however it is quite usable. I created this project to help teach myself the Laravel framework, study REST API development, and apply enterprise architecture patterns. ~@bgetsug

Overview

Hostbase is a systems and network administration tool for cataloging hosts, subnets, and IP addresses. It is designed to support private or public cloud operations of any size. Whether you have a few dozen or a few thousand hosts across multiple environments and data centers, Hostbase can provide the foundation of a service-oriented architecture for tracking the lifecycle of hosts and networks. Instead of storing duplicate host information across your continuous integration server, deployment tools, provisioning system, or other CMDB, Hostbase can provide a single, centralized interface for storing and retrieving this information dynamically.

Technology

Hostbase uses Couchbase Server to store data with whatever schema you choose, so you're not locked in to any particular data models other than the primary concepts of hosts, subnets, and IPs. These objects are stored as JSON documents in a single Couchbase bucket. Using the Couchbase plug-in for Elasticsearch, data is streamed in real-time from Couchbase to Elasticsearch. This allows for full-text search using Elasticsearch/Lucene query string syntax. For example, let's assume you "tag" your hosts by role, environment, and data center. To retrieve a list of all hosts of the 'web_server' role, in the 'QA' environment, in the 'dallas01' data center, the search query might be as simple as: env:qa AND role:web_server AND datacenter:dallas01.

In addition to Couchbase and Elasticsearch, Hostbase requires a web server with PHP 5.5 or greater. All search and CRUD operations are available through a RESTful web service.

Installation

A rough overview (everything on a single machine)...

  1. Download and install Couchbase Server
  2. On your Couchbase server:
    • Create (or keep) the 'default' bucket. This will be used for sessions / cache.
    • Create a bucket called 'hostbase' (you can call it whatever you want, but the default config supports this naming convention)
  3. Download and install Elasticsearch 1.3.0.
  4. On your Elasticsearch server, create an index called 'hostbase' with at least 1 shard...replicas are optional but recommended. The data can always be re-indexed by replicating from Couchbase again.
  5. Install the Couchbase Plug-in for Elasticsearch
  6. Configure Couchbase XDCR to replicate the 'hostbase' bucket to the Elasticsearch cluster
  7. Install PHP 5.5 and the web server of your choice (tested with Apache)
  8. Install the Couchbase PHP Client Library
  9. Download/clone this whole repository to the directory of your choice, and configure your web server to serve it as you would any other Laravel-based project. See http://laravel.com/docs/installation for more info. You can also download it with Composer by running composer create-project shift31/hostbase -s dev.
  10. From the project root, run: composer install

Optional, but recommended, download the CLI (PHAR)

Development Server (Vagrant)

For development or trial purposes, save yourself some installation time and use Vagrant. You'll need 1.5 GB free RAM.

Configuration

See http://laravel.com/docs/configuration for background information on configuring a Laravel-based project.

  1. Edit app/config/app.php accordingly.
  2. Edit app/config/database.php with your Couchbase server info (if you're running Couchbase on a separate host).
  3. Edit app/config/elasticsearch.php as needed. See https://github.com/shift31/laravel-elasticsearch for details.
  4. If you don't want to use Couchbase's memcached functionality for sessions/cache, edit app/config/session.php and app/config/cache.php accordingly.

Usage

There's no web UI or bulk raw data (JSON, CSV) import tool yet. So if you have a lot of hosts, your best bet is to use the PHP Client Library and write your own importer. Feel free to explore the importers below for examples.

REST API endpoints

URI Action Comments
GET hosts HostController@index Lists all hosts
POST hosts HostController@store
GET hosts/{host} HostController@show
PUT hosts/{host} HostController@update
PATCH hosts/{host} HostController@update
DELETE hosts/{host} HostController@destroy
GET subnets SubnetController@index Lists all subnets
POST subnets SubnetController@store
GET subnets/{subnet} SubnetController@show
PUT subnets/{subnet} SubnetController@update
PATCH subnets/{subnet} SubnetController@update
DELETE subnets/{subnet} SubnetController@destroy
GET ipaddresses IpAddressController@index Lists all IP addresses
POST ipaddresses IpAddressController@store
GET ipaddresses/{ipaddress} IpAddressController@show
PUT ipaddresses/{ipaddress} IpAddressController@update
PATCH ipaddresses/{ipaddress} IpAddressController@update
DELETE ipaddresses/{ipaddress} IpAddressController@destroy

cURL examples

Store a host
Show a host

curl http://hostbase.192.168.33.10.xip.io/hosts/hostname.domain.tld | python -m json.tool

Update a host (add a field)

curl -X PUT -H 'Content-Type: application/json' http://hostbase.192.168.33.10.xip.io/hosts/hostname.domain.tld -d '{ "foo": "bar" }' | python -m json.tool

Update a host (delete a field)

curl -X PUT -H 'Content-Type: application/json' http://hostbase.192.168.33.10.xip.io/hosts/hostname.domain.tld -d '{ "foo": null }' | python -m json.tool

Delete a host

curl -X DELETE http://hostbase.192.168.33.10.xip.io/hosts/hostname.domain.tld | python -m json.tool

Command Line Interface

The CLI leverages the API client library, so you can administer your Hostbase server from anywhere PHP is installed.

https://github.com/shift31/hostbase-cli

Importers

API Client Library for PHP

https://github.com/shift31/hostbase-api-client-php

Security

If your host and network data is sensitive, it is up to you to provide the firewalls, VPNs, and associated authentication methods to protect your data.

Basic authentication will be implemented soon, but until then it is recommended (at the very least) to only operate Hostbase server/client on a private network.

To-do / ?


All versions of hostbase with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
laravel/framework Version 4.2.*
barryvdh/laravel-ide-helper Version 1.*
shift31/laravel-elasticsearch Version 1.3.*@dev
symfony/yaml Version ~2.6
league/fractal Version @stable
doctrine/inflector Version 1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shift31/hostbase contains the following files

Loading the files please wait ...