A következő címkéjű bejegyzések mutatása: vmware. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: vmware. Összes bejegyzés megjelenítése

2016. szeptember 19., hétfő

Connect your Jira instance to a HipChat

Last year I got the chance to manage an Atlassian Jira and Confluence server. That was fun so far. But last week I was given a new task: fire up a HipChat instance and connect it with Jira. I wasted some days figuring out what to do with that exactly so to anyone getting here with Google: you are so lucky that I can tell you everything that you never find in any Atlassian docs. Here are the steps I have done.
1: download your HipChat  VM instance and import it to a Vmware host. (Change RAM, NIC etc. settings according your needs.)
2: Start, login with admin / hipchat into your console (to su, type: sudo /bin/dont-blame-hipchat)
3: Set your fix IP networking with such a command:  hipchat network -m static -i 192.168.100.20 -s 255.255.255.0 -g 192.168.100.254 -r 192.168.100.254
4: Open your /etc/hosts for edit and enter: 192.168.100.20 hipchat hipchat.mynetwork.local
5: In your nameserver set a new record for hipchat, e.g. hipchat.mynetwork.local (192.168.100.20)
6/a: generate a self signed SSL certificate
6/b: request a certificate from an external cert provider (see below *)
7: Finish your HC install using your (trial) licence and this certificate. (Certificate and hostname can be changed later)
8: Install HipChat connect Add-On in your Jira
9: Here comes the tricky part that drove me nuts. One can't simply force Jira connect to Hipchat because of Java engine in Jira won't trust HipChat's cert by default. You will notice that if you check catalina.out logfile in Jira: cat /opt/atlassian/jira/logs/catalina.out :
 /rest/hipchat/integration/latest/installation/complete [c.a.p.hipchat.rest.HipChatLinkResource] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So you have two choices.
First: manually add your cert to the trusted java store. Get your server public key, detailed here. Once got your pub key into a file, execute this command: (check your paths ofcoz')
/opt/atlassian/jira/jre/bin/keytool -import -alias hipchat.mighty.org -keystore /opt/atlassian/jira/jre/lib/security/cacerts -file /certs/mypubhipchat.crt
It asks you for a password. What the heck, what kind of password, you might ask! That is the default password for Java cert storage and hopefully nobody changed it in your system, so enter: changeit for password.

Second method: install SSL for Jira add-on. It's easier.

See attached srceenshot: it assists you installing the server cert. It creates an updated but temporary java keystore file and you have to copy it in place of the production keystore later and then restart the whole Jira.

10. Success ! (almost..)




* 7/b: in this case you'll need an external FQDN so have to own a domain name. So for example if you own mighty.org domain name, do the following:
- create a CSR for hipchat.mighty.org with your favorite linux home system.
- request a trusted certificate at a trusted 3rd party cert provider for hipchat.mighty.org
- in your INTERNAL(!) nameserver, create a new zone called hipchat.mighty.org and assing 192.168.100.20 to its @ value.



2013. szeptember 4., szerda

VMware Tools annoyance install troube

Ever faced the problem that you are unable to install a simple VMwaretools package on your newly installed nice Linux? (In this example: 13.04 Ubuntu)
Mount the cd, copy and unpack the tar, start the install script... and so on, you know the order. And be surprised with the message:

Searching for a valid kernel header path... The path "" is not valid. Would you like to change it?[yes]
This looks serious but can be easily solved by:
apt-get install build-essential linux-headers-$(uname -r)
and then
ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

We happy Vincent?
Unfortunately we not.
WMvare tools reinstalling process the tells us some sad words:

[...]
Detected the kernel headers at "/lib/modules/3.8.0-19-generic/build/include".
The path "/lib/modules/3.8.0-19-generic/build/include" appears to be a valid
path to the 3.8.0-19-generic kernel headers.
Would you like to change it? [no]

Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-8gevFc/vmci-only'
/usr/bin/make -C /lib/modules/3.8.0-19-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /tmp/modconfig-8gevFc/vmci-only/linux/driver.o
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:127:4: error: initializer element is not constant
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:127:4: error: (near initialization for ‘vmci_driver.remove’)
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:1754:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:1982:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:2063:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:2137:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/modconfig-8gevFc/vmci-only/linux/driver.c:1717:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/modconfig-8gevFc/vmci-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/modconfig-8gevFc/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/modconfig-8gevFc/vmci-only'
&@#&@##&@&@@@@
Keep calm. Say you unpacked the tools to /usr/
So:
cd /usr/vmware-tools-distrib/
wget http://blog.gnu-designs.com/downloads/vmware-tools-linux-kernel-3.8_vmci_pci_hotplug_struct.patch
tar -xvf lib/modules/source/vmci.tar


Now, your directory looks like:

b# ls -l
drwxr-xr-x  2 root root   4096 jul   14  2012 bin
drwxr-xr-x  2 root root   4096 jul   14  2012 doc
drwxr-xr-x  4 root root   4096 jul   14  2012 etc
-rw-r--r--  1 root root 251898 jul   14  2012 FILES
lrwxrwxrwx  1 root root     13 jul   14  2012 INSTALL -> ./doc/INSTALL
drwxr-xr-x  2 root root   4096 jul   14  2012 installer
drwxr-xr-x 14 root root   4096 jul   14  2012 lib
drwxr-xr-x  5 root root   4096 jul   14  2012 vmci-only
lrwxrwxrwx  1 root root     31 jul   14  2012 vmware-install.pl -> ./bin/vmware-uninstall-tools.pl
-rw-r--r--  1 root root   1285 aug   23 00:10 vmware-tools-linux-kernel-3.8_vmci_pci_hotplug_struct.patch

Patch that driver:

root@server:/usr/vmware-tools-distrib# patch -p0 < /usr/vmware-tools-distrib/vmware-tools-linux-kernel-3.8_vmci_pci_hotplug_struct.patch
patching file vmci-only/linux/driver.c
Repack it.
root@server:/usr/vmware-tools-distrib# tar -cf vmci.tar vmci-only/
Overwrite the original bad one.
root@server:/usr/vmware-tools-distrib# cp vmci.tar lib/modules/source/

One more try! Reinstall now says:

---
Detected the kernel headers at "/lib/modules/3.8.0-19-generic/build/include".
The path "/lib/modules/3.8.0-19-generic/build/include" appears to be a valid
path to the 3.8.0-19-generic kernel headers.
Would you like to change it? [no]

Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-PYbj5R/vmci-only'
/usr/bin/make -C /lib/modules/3.8.0-19-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/linux/driver.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciContext.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciResource.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/modconfig-PYbj5R/vmci-only/driverLog.o
  LD [M]  /tmp/modconfig-PYbj5R/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-PYbj5R/vmci-only/vmci.mod.o
  LD [M]  /tmp/modconfig-PYbj5R/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-PYbj5R/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-PYbj5R/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/modconfig-PYbj5R/vmci-only'

Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-uWidjn/vmci-only'
/usr/bin/make -C /lib/modules/3.8.0-19-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/linux/driver.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/linux/vmciKernelIf.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciContext.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciDatagram.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciDoorbell.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciDriver.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciEvent.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciHashtable.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciQPair.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciQueuePair.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciResource.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/common/vmciRoute.o
  CC [M]  /tmp/modconfig-uWidjn/vmci-only/driverLog.o
  LD [M]  /tmp/modconfig-uWidjn/vmci-only/vmci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-uWidjn/vmci-only/vmci.mod.o
  LD [M]  /tmp/modconfig-uWidjn/vmci-only/vmci.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-uWidjn/vmci-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-uWidjn/vmci-only'
cp -f vmci.ko ./../vmci.o
make: Leaving directory `/tmp/modconfig-uWidjn/vmci-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-uWidjn/vsock-only'
/usr/bin/make -C /lib/modules/3.8.0-19-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.8.0-19-generic'
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/af_vsock.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/notify.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/notifyQState.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/stats.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/util.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/linux/vsockAddr.o
  CC [M]  /tmp/modconfig-uWidjn/vsock-only/driverLog.o
  LD [M]  /tmp/modconfig-uWidjn/vsock-only/vsock.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/modconfig-uWidjn/vsock-only/vsock.mod.o
  LD [M]  /tmp/modconfig-uWidjn/vsock-only/vsock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.8.0-19-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
          MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-uWidjn/vsock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-uWidjn/vsock-only'
cp -f vsock.ko ./../vsock.o
make: Leaving directory `/tmp/modconfig-uWidjn/vsock-only'

 [....]

Whooohooooo, bingo!