danielpassos
4/6/2016 - 10:16 AM

RHMAP - fhcap/digger tips

RHMAP - fhcap/digger tips

RHMAP

A collection of useful tricks about RHMAP/Digger deploy/maintain

Most of the commands listed required to be connected on Engineering-VPN

TOC

Create personal instance

To create your own/personal instance check this gist

Update instance

Based in a PR

fhcap cluster provision --name [instance] \
                        --git-ref refs/pull/[pr number]/head

Based in a branch or tag

fhcap cluster provision --name [your instance name] \
                        --git-ref [branch] or [tag]

PS: You will need the hadmin knife password. You can find it in the data_bags/environments. See and example for meh2

Check digger version

Using knife command

knife search "chef_environment:{instance}* AND roles:fh-digger" \
             -a fh-digger.version -a fh-digger.build -c ~/fhcap/.chef/knife-bob.rb

Using version URL

http://{instance}-farm-linux1.feedhenry.net:8816/sys/info/version

Force update specific digger instance

knife ssh "chef_environment:{instance}* AND roles:fh-digger AND fqdn:{machine}" \
          "sudo chef-client" -x hadmin -a cloud.public_ipv4 -c ~/fhcap/.chef/knife-bob.rb

Example

knife ssh "chef_environment:meh1* AND roles:fh-digger AND fqdn:meh1-farm-linux1" \
          "sudo chef-client" -x hadmin -a cloud.public_ipv4 -c ~/fhcap/.chef/knife-bob.rb

Check digger logs

ssh hadmin@{instance}-{machine}.feedhenry.net
tail -f /var/log/feedhenry/fh-digger/*.log

example

ssh hadmin@meh1-farm-linux1.feedhenry.net
tail -f /var/log/feedhenry/fh-digger/*.log

Android only logs

https://{instance}-builder.feedhenry.net/digger/android/buildlogs/{build-id}

List all nodes available on bob:

knife search "chef_environment:{instance}*" -c ~/fhcap/.chef/knife-bob.rb -a cloud

Easier way to delete Android SDK temp dir:

From: https://github.com/fheng/help/pull/123#issuecomment-227672072

knife ssh "chef_environment:{instance}* AND recipes:fh-digger\:\:android" "sudo rm -rf /usr/local/android-sdk/temp" -c ~/fhcap/.chef/knife-bob.rb -a cloud.public_ipv4 -x hadmin

RabbitMQ

Go to: http://testing.passos.skunkhenry.com:[port]

Check the RabbitMQ port using: fhcap cluster info --name=[INSTANCE_NAME]

The default credentials is:
Login: admin
Password: feedhenry101

To confirm the credentials ssh your instance and check the cat /etc/rabbitmq/rabbitmq file

An alternative to check RabbitMQ status is ssh your instance and run sudo rabbitmqctl status

Check Millicore version

Go to http://testing.client3.skunkhenry.com/box/srv/1.1/tst/version