ameh Documentation Release Eric Pierce

Similar documents
withenv Documentation

turbo-hipster Documentation

Configuring Multiple Instances of Railo on Linux

Automating Linux App Startup

django-reinhardt Documentation

Poulpe Documentation. Release Edouard Klein

Python wrapper for Viscosity.app Documentation

diceware Documentation

Moodle Destroyer Tools Documentation

Python Project Example Documentation

BanzaiDB Documentation

TPS Documentation. Release Thomas Roten

Gunnery Documentation

Game Server Manager Documentation

Aldryn Installer Documentation

DNS Zone Test Documentation

ardpower Documentation

Automating Linux App Startup

Integration of UNICORE Components into Linux Systems

edeposit.amqp.antivirus Release 1.0.1

Frontier Documentation

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi

LAN Setup Reflection. Ask yourself some questions: o Does your VM have the correct IP? o Are you able to ping some locations, internal and external?

Using IDLE for

I hate money. Release 1.0

Authored by: Brian E. Brzezicki Copyright 2013, Paladin Group LLC Reuse without permission is strictly prohibited

Unifer Documentation. Release V1.0. Matthew S

I2C LCD Documentation

Roman Numeral Converter Documentation

Redis Timeseries Documentation

bottle-rest Release 0.5.0

Release Nicholas A. Del Grosso

Services, logging, accounting Todd Kelley CST8177 Todd Kelley 1

Pulp Python Support Documentation

Python simple arp table reader Documentation

sainsmart Documentation

open-helpdesk Documentation

LAN Setup Reflection

LXDock Documentation. Release dev. Virgil Dupras, Morgan Aubert

The RestructuredText Book Documentation

doconv Documentation Release Jacob Mourelos

Plumeria Documentation

Migrating to WebGUI on VMWare

chatterbot-weather Documentation

fragapy Documentation

PYOTE installation (Windows) 20 October 2017

google-search Documentation

Aircrack-ng python bindings Documentation

find starting-directory -name filename -user username

simplevisor Documentation

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Simple libtorrent streaming module Documentation

Catbook Workshop: Intro to NodeJS. Monde Duinkharjav

7.3 Install on Linux and Initial Configurations

swiftenv Documentation

Open a browser and download the Apache Tomcat 7 and Oracle JDBC 6 JAR from these locations. The Oracle site may require that you register as a user.

Google Domain Shared Contacts Client Documentation

Python data pipelines similar to R Documentation

Django IPRestrict Documentation

Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków

Managing Infrastructure with Python, Fabric and Ansible. By Tim Henderson hackthology.com github.com/timtadh

minit Felix von Leitner September 2004 minit

django-cron Documentation

gunny Documentation Release David Blewett

Installing and Using Docker Toolbox for Mac OSX and Windows

oemof.db Documentation

Getting started with Python

Containers. Pablo F. Ordóñez. October 18, 2018

Archan. Release 2.0.1

PyCRC Documentation. Release 1.0

manifold Documentation

Basics. I think that the later is better.

Installing Altiris Agent on Ubuntu

Getting Started with MySQL

Kivy Designer Documentation

otree Virtual Machine Manager Documentation

Basic Model Interface Documentation

Python Schema Generator Documentation

TangeloHub Documentation

Biostar Central Documentation. Release latest

9.2 Linux Essentials Exam Objectives

syslog-ng Apache Kafka destination

Garment Documentation

Booting up and Shutting down A primer for troubleshooting

Django-CSP Documentation

Platform Migrator Technical Report TR

My Favorite bash Tips and Tricks

Can t Believe It s Linux. a totally different and hypothetical linux distribution

trevor.bramwell.net Documentation

systemd: Converting sysvinit scripts

q3py Documentation Release c robo9k

tapi Documentation Release 0.1 Jimmy John

Purpose. Target Audience. Install SNMP On The Remote Linux Machine. Nagios XI. Monitoring Linux Using SNMP

This document provides instructions for upgrading a DC/OS cluster.

yardstick Documentation

Lec 1 add-on: Linux Intro

gpib-ctypes Documentation

L.I.S.A Linux Client Documentation

RHCE BOOT CAMP. The Boot Process. Wednesday, November 28, 12

Transcription:

ameh Documentation Release 0.0.1 Eric Pierce July 17, 2012

CONTENTS 1 Motivation 3 2 Configuration 5 3 Usage 7 3.1 Permissions................................................ 7 3.2 init.................................................... 7 3.3 config................................................... 8 4 Development 9 5 Ideas 11 6 Indices and tables 13 i

ii

ameh Documentation, Release 0.0.1 Tools for managing a set of Atlassian product installations. Source code on github. Contents: CONTENTS 1

ameh Documentation, Release 0.0.1 2 CONTENTS

CHAPTER ONE MOTIVATION This project was born out of recurring annoyances with Atlassian products, specifically: Lack of init.d service scripts to allow automatic startup at boot time Non-standard and scattered configuration files and formats Inconsistently-named and -located executables for starting and stopping servers Too many user accounts created (jira1, jira2 etc.) when installing The name ameh came from atlas meh, which you could see as a synonym for atlas shrug if you re into that sort of thing. If you like acronyms, you could think of it as Atlassian MaintenanceE Helper. The goal of this project is to make me (and possibly others) have a meh, no problem attitude towards Atlassian product maintenance, instead of the please fire me and put me out of my misery attitude that I have now. 3

ameh Documentation, Release 0.0.1 4 Chapter 1. Motivation

CHAPTER TWO CONFIGURATION ameh stores its configuration in a file like this: [jira] install = /opt/atlassian/jira home = /var/atlassian/application-data/jira-home classes = %(install)s/atlassian-jira/web-inf/classes crowd = %(classes)s/crowd.properties db = %(home)s/dbconfig.xml [confluence] install = /opt/atlassian/confluence home = /var/atlassian/application-data/confluence-home db = %(home)s/confluence.cfg.xml # Any apps you don t use will have their sections commented out #[crowd] #[fisheye] New configuration settings can be added using the ameh command-line, or by directly editing the configuration file (which will typically live in /etc/ameh.ini). 5

ameh Documentation, Release 0.0.1 6 Chapter 2. Configuration

CHAPTER THREE USAGE The main way to use ameh is through the command-line script ameh, which includes several subcommands for doing various tasks. Run ameh with no arguments to get help, or ameh <command> with no arguments to get help on a particular command. 3.1 Permissions All ameh commands are designed to be run as a normal user, without requiring root access. It s recommended that you use sudo only when you actually need elevated permissions for something. 3.2 init Atlassian products tend not to include /etc/init.d scripts for starting, stopping, or checking the status of your applications. The init command aims to remedy this by providing an init-script generator: $ ameh init jira #!/bin/sh -e # /etc/init.d/jira # [runlevels] [start order] [stop order] # chkconfig: 2345 80 20 # description: jira APP="jira" USER="jira" START="/opt/atlassian/jira/bin/startup.sh" STOP="/opt/atlassian/jira/bin/shutdown.sh" case "$1" in start) echo "Starting $APP" /bin/su -m $USER -c "$START &> /dev/null" ;; stop) echo "Stopping $APP" /bin/su -m $USER -c "$STOP &> /dev/null" ;; restart) $0 stop 7

ameh Documentation, Release 0.0.1 esac *) sleep 5 $0 start ;; echo "Usage: $0 {start restart stop}" exit 1 ;; This command simply generates an init-script based on the settings you have configured in /etc/ameh.ini, and prints it on standard output. This way you, being a responsible sysadmin, can review everything it does before installing it into your /etc/init.d folder. To do that, you can pipe into a tee command with elevated permissions: $ ameh init jira sudo tee /etc/init.d/jira You may need to customize the resulting script for your particular environment, but this will at least give you a starting point. 3.3 config Jira, Confluence, and other Atlassian products have configuration files scattered all over the place. It can be tedious trying to remember where each one is. The config command can help you keep track of them. When you run ameh config <app>, all of the properties defined in the [app] section of your /etc/ameh.ini file are printed. For example, you might get something like: $ ameh config jira jira install: /opt/atlassian/jira jira start: /opt/atlassian/jira/bin/startup.sh jira stop: /opt/atlassian/jira/bin/shutdown.sh jira home: /var/atlassian/application-data/jira-home jira classes: /opt/atlassian/jira/atlassian-jira/web-inf/classes jira db: /var/atlassian/application-data/jira-home/dbconfig.xml Some of these are configuration files, and others are directories or shell scripts. If it s configured, it s printed here. Let s say you want to modify your database configuration, and you don t remember which file that s in: $ ameh config jira db /var/atlassian/application-data/jira-home/dbconfig.xml To edit this file, you can simply surround that command in backticks: $ vim ameh config jira db Or, if you need elevated permissions: $ sudo vim ameh config jira db 8 Chapter 3. Usage

CHAPTER FOUR DEVELOPMENT It s a good idea to run ameh in a virtualenv, especially during development. The short version: $ pip install virtualenvwrapper $ mkvirtualenv ameh Python packages needed for development are listed in dev-req.txt; you can install them with pip like so: $ pip install -r dev-req.txt Due to the preponderance of really old Python versions in enterprise environments like CentOS, the code in ameh is designed to be compatible with Python 2.4. If you contribute new code to ameh, please avoid using features from newer versions of Python. Unit tests are in the tests directory. You can run them with py.test like this: $ py.test 9

ameh Documentation, Release 0.0.1 10 Chapter 4. Development

CHAPTER FIVE IDEAS Some tools that it might be worthwhile to include: init.d scripts, autogenerated based on configured install/home directories Backup scripts Symlinking scripts, making configuration files and logs easier to manage by having them all in one place (preferably somewhere standard like /etc and /var/log) User/group maintainer to prevent multiple jira1, jira2 users from being created, and to run each service as a dedicated user Will probably need: A single configuration file to define which Atlassian products you have installed, where their install/home directories are, what database backend you re using, etc. A nice wrapper executable that can be installed system-wide 11

ameh Documentation, Release 0.0.1 12 Chapter 5. Ideas

CHAPTER SIX INDICES AND TABLES genindex modindex search 13