Coder Social home page Coder Social logo

infonova / infocmdb Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 5.0 33.4 MB

CMDB Solution based on PHP and MySQL, using a Workflow Engine based on GoLang and Perl

License: Apache License 2.0

PHP 60.85% HTML 1.58% Perl 1.18% Batchfile 0.01% Shell 0.08% Dockerfile 0.01% Roff 0.01% JavaScript 35.01% Hack 0.01% Ruby 0.01% TSQL 0.01% PowerShell 0.01% CSS 1.25% Haxe 0.01% Makefile 0.01% Nix 0.01% OpenSCAD 0.01% ABAP 0.01% ActionScript 0.03% Ada 0.01%
php7 golang cmdb zend-framework mysql phinx-migrations jquery docker docker-compose

infocmdb's Introduction

InfoCMDB

Build Status

Highly Customizable Configuration Management Database

InfoCMDB Slideshow

Screenshots

Overview

  • Granular AccessControl (RBAC)
  • Custom Configuration Items (CI)
  • Different Attribute Datatypes
  • Automation with Workflows using GoLang, Perl SDKs

Getting Started

To setup a new instance follow these steps for either production or development.

Prerequisites

  • linux x86
  • minimum hardware required of 2 cores and 4 gb ram
  • docker
  • docker-compose

Installing

Clone the infocmdb repository

git clone https://github.com/infonova/infocmdb

Start the infocmdb using the provided run command

./run up

This will perform all setup steps required to configure the Docker-Environment.

Running setup_env...
Create .env file...
Choose an IMAGE_TAG you want to use [Env: IMAGE_TAG][latest]: 
.env.example -> .env
Setting image tag: latest
Generating random Root Password
Generating random 'infocmdb' User Password
Running setup_nginx...
Choose hostname for nginx vhost [localhost]: infocmdb.prod.local
Set 'infocmdb.prod.local' as DOCKER_WEB_HOSTNAME in .env file
Running setup_docker...
Setting up docker override per environment.
Choose Environment [Env: COMPOSE_ENV] (prod/dev/test) [prod]: prod
  Creating symlink: docker-compose-prod.yml --> docker-compose.override.yml

Use this command to start application:
 ./run up 

Login at: http://infocmdb.prod.local || https://infocmdb.prod.local

SSL Certificate

Inside the web container you can add additional configuration in the /bootstrap/custom-conf directory.

Using the docker-compose for example:

    volumes:
      - "./docker/nginx/custom-conf:/bootstrap/custom-conf:ro"

Generate dhparams

To use ssl we generate a dhparam file to enable forward secrecy.

./run generate_dhparam                             
Running generate_dhparam...
Create Diffie Hellman param for nginx
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM alpine
 ---> b7b28af77ffe
Step 2/2 : RUN apk update &&   apk add --no-cache openssl &&   rm -rf /var/cache/apk/*
 ---> Using cache
 ---> ac67e96cd7fb
Successfully built ac67e96cd7fb
Successfully tagged openssl:latest
Generating DH parameters, 4096 bit long safe prime, generator 2
This is going to take a long time
.......... <this takes a long time> ...........

Generate self-signed-certificate and vhost configuration

./run gencert infocmdb.local                                    
Running generate_dhparam...
  Already exists 'docker/nginx/custom-conf/conf.d/ssl/dhparam.pem'.
Generating certificate for infocmdb.local
Generating a RSA private key
....................................++++
..........................................................................................................................++++
writing new private key to '/app/docker/nginx/custom-conf/conf.d/ssl/infocmdb_local.key'
-----
Saved certificate to docker/nginx/custom-conf/conf.d/ssl/infocmdb_local... key/crt
Created docker/nginx/custom-conf/conf.d/ssl_infocmdb_local.conf

RUN Commands

To automate tasks the ./run command can be used

####################
# infoCMDB Console #
####################

Utility for handling an infoCMDB installation

Usage:
  run <command> [--non-interactive] [--command-options] [<arguments>]
  run -h | --help

Options:
  -h --help           Display this help information.
  --non-interactive   Run without asking questions and apply configuration defaults

Help:
  run help [<command>]

Available commands:
  bash
  build
  clean_cache
  commands
  container_name
  cron
  data_backup
  data_import
  destroy
  down
  edit
  gencert
  help
  mysql
  mysql_backup
  mysql_dump
  mysql_import
  restart
  setup
  setup_all
  setup_docker
  setup_env
  setup_lib
  setup_nginx
  setup_nginx_ssl
  up
  update_run
  version

Backup

For creating backups of a running infoCMDB instance mysql and data can be dumped

Database (mysql)

THIS WILL DESTROY ALL EXISTING DATA!

./run mysql_backup
Completed mysqldump: dump-2019-10-30_152732.sql.gz
./run mysql_import dump-2019-10-30_152732.sql.gz

Volume Data (/app/data)

THIS WILL DESTROY ALL EXISTING DATA!

./run data_backup
Completed databackup: data-2019-10-30_152819.tar.gz
./run data_import data-2019-10-30_152819.tar.gz

Optional

Mountpoints / Directories

  • /app/data all working files are stored in this directory.
  • /app/data/configs is used to store all configuration files.

In case you want to directly interact with the cmdb data, for development or testing you can modify the mount point.

docker-compose.yml:

services:
...
  php:
    ...
    volumes:
      ...
      - "./<bind_directory_data>:/app/data:cached"
...

This is not recommended for productive environments and often leads to permission or performance issues on windows.

MySQL Database Port

If required it is possible to add an export for the mysql ports.

Either enable the option in the docker-compose.yml or add it to the docker-compose.override.yml:

version: "3.4"

services:
  mariadb:
    ports:
      - '${DOCKER_DB_PORT}:3306'

Set the DB_PORT in the .env file:

DB_PORT=3306

License

This project is licensed under the Apache License 2.0 - see LICENSE file for details.

Contact / Support

If you have any questions and prefer email, feel free to contact us at: [email protected]

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.