Jira with SSL and Apache as proxy

If you want to run your installation of Atlassian Jira completely over SSL proxied by Apache please note the following:

Apache configuration example (apache is running not on same machine as jira, jira url is jira.example.com)

ServerAdmin admin@example.com
ServerName jira.example.com

ErrorLog /var/log/apache2/jira.example.com/ssl-error.log
LogLevel warn
CustomLog /var/log/apache2/jira.example.com/ssl-access.log combined
ServerSignature On

SSLEngine On
SSLCertificateFile jira.example.crt
SSLCertificateKeyFile jira.example.key
SSLCertificateChainFile CA.crt
SSLProxyEngine on

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://jirahost:8080/
ProxyPassReverse / http://jirahost:8080/


Jira Standalone Tomcat configuration
Besides the usual apache proxy configuration you have to extend the server.xml file of your jira tomcat standalone server (the 3 bold lines at the end are new):

Connector port="8080"
maxThreadv="150"
minSpareThreads="25"
maxSpareThreads="75"
connectionTimeout="20000"
enableLookups="false"
maxHttpHeaderSize="8192"
protocol="HTTP/1.1"
useBodyEncodingForURI="true"
redirectPort="8443"
acceptCount="100"
disableUploadTimeout="true"
scheme="https"
proxyName="jira.example.com"
proxyPort="443" />

Finally, you have to set the Base URL of your Jira Installation accordingly, in the example above to https://jira.example.com

Related Posts:

Upgrading Graylog2 from 0.9.5p2 to 0.9.6 with data migration

graylog2 logoThe Graylog2 “party-gorilla” team around Lennart Koopmann just released the final version of graylog2 0.9.6. It includes major changes and new features, such as:

  • ElasticSearch as new message store
  • new analytics shell, a terminal like browser gui for running queries
  • faster long term graphs
  • internal message queing systems to absorb and resist load spikes
  • new stream rules and filters
  • a lot of small improvements and bugfixes

The following migration guide describes the manual upgrade process on debian in detail:

Download new 0.9.6 release, for example into /opt and unpack it
https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6.tar.gz
tar xzfv graylog2-server-0.9.6.tar.gz

Download elasticsearch, most recent version from here and unpack it, for example:
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.6.tar.gz
tar xzfv elasticsearch-0.18.6.tar.gz

configure basic elasticsearch values, see elasticsearch configuration for details, for example:
network.host: 192.168.164.100
path:
logs: /var/log/elasticsearch
data: /var/data/elasticsearch
cluster:
name: graylog2

Download elasticsearch-servicewrapper (tanuki-wrapper) into your elasticserach/bin installation directory and unpack it there
wget https://github.com/elasticsearch/elasticsearch-servicewrapper/zipball/master
mv master elasticsearch-servicewrapper.zip && unzip elasticsearch-servicewrapper.zip
mv elasticsearch-elasticsearch-servicewrapper-*/* . && rm -rf elasticsearch-elasticsearch-servicewrapper-*

Start elasticsearch instance bia servicewrapper in /bin/service
./elasticsearch start
Starting ElasticSearch...
Waiting for ElasticSearch.......
running: PID:14816

Check if your elasticsearch instance started successfully. The logfile (defaut here in /var/log/elasticsearch/graylog2.log) should show something like this:
[2011-12-23 22:21:03,711][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: initializing ...
[2011-12-23 22:21:03,716][INFO ][plugins ] [Celestial Madonna] loaded [], sites []
[2011-12-23 22:21:05,299][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: initialized
[2011-12-23 22:21:05,299][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: starting ...
[2011-12-23 22:21:05,352][INFO ][transport ] [Celestial Madonna] bound_address {inet[/192.168.164.100:9300]}, publish_address {inet[/192.168.164.100:9300]}
[2011-12-23 22:21:08,385][INFO ][cluster.service ] [Celestial Madonna] new_master [Celestial Madonna][WiNh0iYwQyeipER3PuXZSg][inet[/192.168.164.100:9300]], reason: zen-disco-join (elected_as_master)
[2011-12-23 22:21:08,408][INFO ][discovery ] [Celestial Madonna] graylog2/WiNh0iYwQyeipER3PuXZSg
[2011-12-23 22:21:08,415][INFO ][http ] [Celestial Madonna] bound_address {inet[/192.168.164.100:9200]}, publish_address {inet[/192.168.164.100:9200]}
[2011-12-23 22:21:08,416][INFO ][node ] [Celestial Madonna] {0.18.6}[14818]: started
[2011-12-23 22:21:08,419][INFO ][gateway ] [Celestial Madonna] recovered [0] indices into cluster_state

Get the MongoDB to ElasticSearch migrator script from joschi
git clone https://github.com/joschi/graylog2-mongo-es-migrator.git

you need at least to adapt to config/migrator.yml with your mongodb username, password and host, usage:
After you've downloaded the script you should edit the configuration file in config/migrator.yml. If the ElasticSearch and MongoDB servers are running on the same system (on localhost) and MongoDB doesn't need authentication you can keep the file as is.

Get required dependencies with Bundler:
bundle install

prepare a new graylog2.conf in /tmp/graylog2.conf with new settings (or just copy the new config and adapt your settings). The new default configuration settings are:
elasticsearch_url = http://localhost:9200/
elasticsearch_index_name = graylog2
force_syslog_rdns = false
mq_batch_size = 4000
mq_poll_freq = 1
mq_max_size = 0

be brave and do a “hole-in-one” migration from the migrator directory (the following line works depending from where your graylog2 servers resides):
ps aux | grep graylog2-server.jar | awk {'print $2'} | xargs kill; ruby migrator.rb;cp /tmp/graylog2.conf /etc/graylog2.conf/; cd ../graylog2-server-0.9.6/bin/;./graylog2ctl start

Get the new web interface from github
git clone https://github.com/Graylog2/graylog2-web-interface.git

get required dependencies for the graylog2 web-interface
cd graylog2-web-interface; bundle install

Configure new web-interface (copy old configs, adapt new parameters, create new indexer.yml file with correct elasticsearch settings), be sure to check
indexer.yml
mongoid.yml
general.yml
email.yml

Start the bundled server or adapt your apache/passenger settings

Login to your web-interface, check if latest events are dropping in.

Write a “thank you party-gorilla” tweet to the @graylog2 twitter account

Related Posts:

Screenshot erstellen mit Android 4.0 ICS und Google Nexus S

Ein Krüppel von Android war schon immer, dass man ohne Root und sonstige Fummelei keinen Screenshot erstellen konnte. Mit Android 4.0 (Ice Cream Sandwich) ist das nun endlich möglich.

Man muss dazu (unter meinem Google Nexus S zumindest) einfach den Volume Down und Power Button gleichzeitig drücken und schon erstellt das Endgerät einen Screenshot des aktuellen Desktops.
Ganz so zuverlässig wie unter iOS funktioniert es allerdings noch nicht, man muss die Knöpfe schon exakt zur selben Zeit drücken, dann erscheint in der Notification Bar ein “Screenshot wird gespeichert” und eine Sekunde später findet man das Bild in der Gallery App im eigenen Ordner “Screenshots“.

So schaut das dann aus:

Ice Cream Sandwich Screenshot

Was eine Geburt. Ice Cream Sandwich finde ich übrigens sehr gelungen, aber darüber berichte ich noch etwas ausführlicher.

Related Posts:

Workaround für Bookmarks auf dem Safari für iPad/iPhone

Das Bookmark Management ist im aktuellen iOS total kaputt – zumindest, wenn man Safari nicht auf all seinen Geräten als Browser verwendet.
Möchte ich einen Link von einem mobilen Endgerät (iPad/iPhone) weitergeben, so kann ich das momentan entweder auf twitter posten oder per E-Mail weiterleiten. Möchte ich allerdings eine Seite in Evernote/Instaper speichern, oder sie auch einfach nur im Google Reader abonnieren, so ist der Weg zum Ziel sehr umständlich.

Chris Bray beschreibt in seinem Blog aber einen Workaround, der zwar auch nicht das Gelbe vom Ei ist, mit dem man aber erstmal Leben kann.

Das Ganze funktioniert, in dem man für jeden gewünschten Dienst ein eigenes Lesezeichen-Bookmarklet hinterlegt.
Die Javascript Codes hierfür hat Chris auf eine extra Seite ausgelagert.
Wie komme ich nun ans Ziel? Auch nicht so einfach:

  1. Man speichert erstmal einen Bookmark zu der Seite und benennt ihn beispielsweise in “Add to Google Reader” (Die URL kann man in diesem Moment allerdings noch nicht ändern, ein Hoch auf die Usability ;) )
  2. Man wechselt in den Tab zu der Bookmark Liste zurück (der sich ggf. neu läd..) und kopiert sich den entsprechenden Javascript Code, z.b. für den Google Reader:
  3. Man öffnet seine Lesezeichen, klickt auf bearbeiten und dann auf das Lesezeichen.
  4. Im darauffolgenden Pop-up kann man den URL Code nun löschen und den entsprechenden Schnipsel von oben eintragen.
  5. Diese umständliche Prozedur führt man nun einfach für all seine Dienste durch.

Über diese Bookmarklets kann man nun in Zukunft Seiten relativ leicht weitergeben.
Bei manchen der Javascript Codes muss man etwas aufpassen, da sie teilweise noch personalisierten Code enthalten.

Das das Ganze auch bequemer gehen kann sieht man übrigens bei Android. Hier kann eine App sich in die “Seite weitergeben” Funktion einklicken und man kann dann direkt aus jeder weitergebenden Applikation verwenden.

Related Posts:

Installing Icinga 1.6.1 on Debian Squeeze with icinga-web

This small how-to briefly describes the installation of icinga 1.6.1 on debian squeeze 6.0 and details the install and configuration of the newest icinga-web (1.6.0).

Unfortunately, the latest icinga package version in debian are:

Because of that we have two choices getting the latest 1.6.1 version of icinga:
Install from source or use the debian packages of icinga in unstable tree (icinga itself is very stable).

  1. simply add

    deb http://ftp.debian.org/debian sid main

    as new line in file /etc/apt/sources.list

  2. do an

    apt-get -t unstable install icinga icinga-idoutils icinga-phpapi

  3. configure icinga & idoutils according to your needs (there is plenty information on the web on this)
  4. Clone recent icinga from git repository (the icinga debian maintainer won’t include icinga-web)

    cd /usr/src && git clone git://git.icinga.org/icinga-web.git

  5. Build icinga-web

    cd icinga-web/ && ./configure –with-api-cmd-file=/var/lib/icinga/rw/icinga.cmd –with-conf-dir=/etc/icinga-web –with-log-dir=/var/log/icinga-web –with-cache-dir=/var/cache/icinga-web

  6. Install Icinga-web

    make install

  7. Install Apache2 config for Icinga-web

    make install-apache-config

  8. Create icinga-web database in mysql

    mysql -u root -p icinga_web < /usr/src/icinga-web/etc/schema/mysql.sql

  9. change database settings in configuration file for icinga itself and icinga-web

    vi /usr/local/icinga-web/app/config/databases.xml

    Line 28: mysql://icinga_web:password@localhost:3306/icinga_web
    Line 79: mysql://icinga-idoutils:password@localhost:3306/icinga

  10. Clear the cache
  11. You should now be able to login to icinga-web with username “root” and password “password” on http://localhost/icinga-web (change password afterwards)

have fun!

Next: Installation and integration of the new InGraph Grapher Addon into icinga-web

Source: Icinga Wiki

Related Posts:

Dropbox Speicher auf 16 GB vergrößern mit Google AdWords

Den freien Cloud Speicher Dienst Dropbox kennen nun sicherlich die meisten unter euch. Auch die Tatsache, dass man sich mit Empfehlungen bis zu 16 GB zusätzlich verdienen kann, hat sich mittlerweile ebenfalls rumgesprochen. Seit geraumer Zeit kann man zudem den Empfehlungsbonus von 250MB auf 500MB verdoppeln, wenn man sich mit seiner Studenten Adresse registriert. Das geht auf dieser Seite. Sollte eure E-Mail Adresse dort nicht akzeptiert werden, so öffnet einfach ein Ticket und der Dropbox Support schaltet euch kurze Zeit später frei.

Wem nun diese ganze Methoden zu lange dauern und zudem die Dropbox Premium Angebote nicht attraktiv genug sind, der kann mit Hilfe von Google Adwords und dem einmaligen Einsatz von ca. 20€ (oder Google AdWords Gutschein) seinen kompletten Einladungsbonus ausschöpfen und den Dropbox Speicher auf über 16 GB erhöhen.

Dies geht ganz einfach, indem man eine Dropbox Kampagne bei Google AdWords schaltet und als Ziel-URL seinen Dropbox Referrer Code verwendet.
18€ und 2 Tage später hatte ich dann mein Ziel erreicht und den kostenlosen Dropbox Speicher maximiert.

Daraus resultierten in meinem Fall 16 abgeschlossene Weiterempfehlungen bei 136 Clicks und 1.252 Impressions. Die CTR betrug sehr gute 10,86%. Der durchschittliche Cost-per-Click betrug 0,13€.

Wie ich die Kampagne eingestellt hab, könnt ihr in den beiden Screenshots sehen.

Dropbox AdWords keyword VerteilungDropox AdWords Kampagnen Einstellungen

Fazit: Ich habe endlich mal etwas an Google zurückgegeben (ausser meinen Daten) und den Service verwendet, der Google groß gemacht hat. Die Keyword Auswahl hat AdWords vollkommen automatisch erledigt und wahrscheinlich hätte ein Tageslimit von 5€ auch erstmal genügt.

(Via dispatched.ch)

Related Posts:

Installing Apache Solr on Debian Squeeze 6.0 and tomcat7

Apache solr logoDue to the lack of an official Apache Solr Package in Debian Squeeze 6.0 this post will briefly describe the installation of tomcat7 together with Apache (Lucene) Solr from Source.

Install tomcat7 package:

apt-get install tomcat7

Download Apache Solr from here, for example:

cd /opt/ && wget http://apache.lehtivihrea.org//lucene/solr/3.4.0/apache-solr-3.4.0.tgz

unpack the package

tar xzfv apache-solr-3.4.0.tgz

copy the solr file to tomcat webapps directory

cp apache-solr-3.4.0/dist/apache-solr-3.4.0.war /var/lib/tomcat7/webapps/solr.war

copy example configs and files to tomcat solr directory

cp -fr example/solr/ /var/lib/tomcat7/

change owner to tomcat

chown -R tomcat7:tomcat7 /var/lib/tomcat7/solr/

restart tomcat

/etc/init.d/tomcat restart

If everything went well you should be able to see the Solr Admin page on http://yourhost.com:8080/solr/admin.
Have Fun!

Related Posts: