Search This Blog

Showing posts with label suse. Show all posts
Showing posts with label suse. Show all posts

Friday, February 26, 2016

Building TheForeman Smart-Proxy from git source on SLES 11sp3

So for months I've been battering my head at the day job trying to integrate puppet in a meaningful fashion.  I wanted The Foreman; a nifty front end manager for both salt AND puppet which allows lifecycle management with relative ease.

Relative is key here, NOTHING is simple in the world of devops.

So I ran into an issue; our puppet-master installation is on a SLES 11.3 box.  Despite getting a CENTOS 6.5 vm setup for theforeman, I needed to somehow run my existing master through a separate Foreman front end.

This is where smart proxies come in.  In a normal, sane, non SLES system, you'd just do something stupid like "apt-get install foreman-proxy" or something like that. Not SLES, nope.

Instead you have to install git:
zypper addrepo http://download.opensuse.org/repositories/devel:/tools:/scm/SLE_11_SP3/devel:tools:scm.repo

zypper addrepo http://download.opensuse.org/repositories/devel:/languages:/perl/SLE_11_SP3/devel:languages:perl.repo

zypper refresh

zypper install git-core

Then you have to prep and clone the source:
     mkdir /var/share/foreman-proxy
    git clone git://github.com/theforeman/smart-proxy.git /var/share/foreman-proxy
    useradd -r foreman-proxy
    mkdir /var/log/foreman-proxy
    mkdir /usr/share/foreman-proxy/ssl
    mkdir /usr/share/foreman-proxy/ssl/certs
    mkdir /usr/share/foreman-proxy/ssl/private_keys
    cd /usr/share/foreman-proxy
    chown -R foreman-proxy:root /usr/share/foreman-proxy/ssl
    chown -R foreman-proxy:foreman-proxy /var/log/foreman-proxy
    there's more, but I'm not 100% on the process so I'll just give you my reference: http://projects.theforeman.org/projects/foreman/wiki/_passenger_on_Puppet_PE_and_use_foreman_as_an_ENC_and_reporting_engine_
Then you have to build/install the source:
cd /usr/share/foreman-proxy
gem build smart_proxy.gemspec
gem install smart_proxy-1.12.0.develop.gem     #note, your ver may vary depending on build's output!
It goes and acts completed but still won't run.
 So that didn't work..

gem install bundler
zypper install ruby1.8-rubygem-ruby-augeas             #requires dev libs/opensuse etc.
cd /usr/share/foreman-proxy bundle install
cd /usr/share/foreman-proxy/bin
./smart-proxy

And I get an error.
There's also a /usr/bin/smart-proxy that gives a different error.
Regardless, this is where we are!


This is as far as I've gotten and given the limited nature of queries on the internet which actually had answers, hopefully this will help some other poor bastard stuck on SLES with a similar issue.

*** addendum 10:45am ***
Turns out after you install smart proxy via bundler, you have to do this:
cd /usr/share/foreman-proxy
bundle exec bin/smart-proxy

At which time you'll discover you need to have a valid settings.yml  file.
That is located in config/settings.yml.example.  So cp that file to config/settings.yml and modify it as needed.  Then rerun bundle exec bin/smart-proxy  and you should have something akin to success!

Friday, December 4, 2015

Project(s) status Friday 12/4/2015

I'm  resolved to try and keep up on my projects for once, instead of letting them languish.  Part of that is being open and honest with my few regular readers about where I'm at:

  1. The Mechwarrior: Dark Age JS game has stalled.  This is because of inherent limitations in Javascript.  The most recent thing I did was build a shellscript which parses the DB @ www.warrenborn.com and builds a JSON for the various expansion packs.  That was done about a month ago.  The question then becomes - what engine do I want to move forward with? Easiest would probably be Unity, since it's got javascript as an optional scripting method.  On a plus note the basic combat engine for one on one combat works like a champ, including statuses like pulse lasers, flamers, etc. 
  2. My Sci-Fi trilogy (book 2) is being reviewed by my proofreaders.  I'm fifteen thousand words and about 8 segments short of where it needs to be before it's a first draft.  So I'm waiting for their reviews so I can get an idea of how to fill out those missing pieces.
  3. My Sci-Fi game (unnamed as of current) is stalled because of life; I am trying to work on it from time to time but it's hard when your job and home life take up 95% of your time.  Current issues are interior shadows in the Game-Guru engine and asset/story choices need firmed up.

In life, I'm a Linux Systems Engineer and Lead Linux Administrator.  I'm currently working on deploying SALTstack to SLES 11 sp4.  I've got most of the elements in place and a functional system running but boy howdy was it ugly to get moving.  You'd think something called (S)use (A)dvanced (L)inux (T)echnologies would be more compatible with (S)use (L)inux (E)nterprise (S)ystem.

I may write up a blog post on it.  Currently I am sticking with puppet for minor tasks despite it's raw incompatibility with Suse's package management system.  It's decent enough at user removal/etc though.  SALTstack however has the benefit of direct 'zypper' package management integration which is pretty sweet considering it's the backbone of how Suse manages packages.  So that's also been taking up my mental CPU cycles. 

One upshot from a gamedev standpoint is I learned how to make functional alpha channel decals work in Game Guru.  This gives me at least one solid tool to work with.  After that I want to work on doing skyboxes, because frankly I find most of the ones on the store are too repetitive or boring for my tastes.