Would AIX 7 support Capistrano 3? - capistrano

Would AIX 7 support Capistrano v3.4.0 (or above) and its dependent scripting tools such as Gem, Ruby, Rake, etc...? and if it does, where could one find a list of supported versions for the dependent scripting tools?

As stated in the Capistrano README, you need Ruby 2.0 or higher. All of Capistrano's gem dependencies are automatically installed when you run gem install capistrano, assuming that your Ruby 2.0 environment is working.
That said, installing Ruby on AIX seems challenging. You may have to compile it from source: Installing Ruby on AIX .
This assumes of course that you want to deploy from AIX (i.e. run the cap command on an AIX machine) as opposed to deploying to AIX (using a Mac, PC, or Linux machine to deploy to an AIX server). If you want to do the latter, you should be fine: Capistrano has no requirements for the server other than sshd.

Related

How to specify cookbook dependencies based on OS?

I am trying to find the best way of managing dependencies which are not available for all OS platforms. Our cookbook is cross-platform, it is aimed at both Linux and Windows systems. One of our recent requirements however, is to add in features that are only needed on Linux.
To do that normally, I would use a 'depends' line in the metadata.rb to specify a separate cookbook as being needed. For example:
depends 'hostfile_edit', '=0.1.2'
Our Chef system is split into two distinct orgs for security reasons - Windows and Linux. However, in this case the "hostfile_edit" cookbook is only available on the Linux org. Hence, when we run rake unit on Windows we get a failure as Chef is unable to reference this other cookbook. The rake unit runs perfectly when run on a Linux system. Similarly, when using the cookbook in a deployment there are failures on Windows, but not on Linux.
The answer lies in metadata.rb file, you can add like this
%w( aix amazon centos fedora freebsd debian oracle mac_os_x redhat suse opensuseleap ubuntu windows zlinux ).each do |os|
supports os
end
You can read more about this are https://docs.chef.io/config_rb_metadata/

How do I get PHP 7.1 to talk to PostgreSQL on RHEL 7?

Running a Laravel installation on a RedHat Enterprise Linux 7 server using PHP 7.1. I can see php-pgsql.x86_64 listed in the available yum packages, but it doesn't appear to be compatible with PHP 7.1 (and indeed is listed as version 5.4.16-43.el7_4.1).
On a lark, I tried installing it anyway and physically moved the pgsql.ini and pdo_pgsql.ini files from /etc/php.d into the relevant PHP 7.1 folder /etc/opt/rh/rh-php71/php.d/ (and did the same with the .so files they reference), but that returns an error indicating that the package couldn't be read (undefined symbol: file_globals_id in Unknown on line 0).
Has anyone managed to get PHP 7.1 talking to PostgreSQL on RHEL 7?
The sysadmin who originally created the server for me set me straight. The problem was I was looking in the wrong repository for the packages I needed for my particular PHP installation. Running the following two commands did the trick:
sudo yum install --disablerepo=* --enablerepo=rhui-REGION-rhel-server-rhscl rh-php71-php-odbc
sudo yum install --disablerepo=* --enablerepo=rhui-REGION-rhel-server-rhscl rh-php71-php-pgsql
We then added those two packages to the Ansible playbook so future generations would not suffer needlessly.

Bundle only supports platforms x64-mingw32 but local is x86_64-linux

I developed my Rails Application in a Windows environment and I am trying to deploy into Linux Ubuntu 16.04. I am stumbling upon this error:
Your bundle only supports platforms ["x64-mingw32"] but your local
platforms are ["ruby", "x86_64-linux"] and there's no compatible match
between those two lists.
I think the problem is with gemfile.lock . in addition to seeing strings with 'x64-mingw32' for each gem; I find that there is also this:
PLATFORMS
x64-mingw32
How do I make my application run in a Linux 16.04 LTS Environment?
Your Gemfile.lock is restricting the platform your app can run on.
Deploying the app into Linux without the .lock file should resolve your issue.
If you have any Windows-specific gems in your Gemfile, its better to move them to a dedicated block:
# Gemfile
platform :mswin, :mingw, :x64_mingw do
gem "tzinfo-data"
gem "win32_api"
end
Capistrano requires the Gemfile.lock file for deployment. Bundler is the one that is causing this but according to their Github it is intented behaviour to make your app compatible with different platforms.
In order for this to work - as of 1.13, you could run bundle lock --add-platform ruby on Windows to add the ruby platform to your lockfile ahead of time.
Github Issue

How can I access two Oracle databases with different versions (8i and 9) using perl?

I'm currently accessing an Oracle database version 9i (9.2.0.8.0) using perl modules DBI (1.613) and DBD::Oracle (1.26). The current scope of the project now requires that I access a version 8i (8.1.7.4.0 ) Oracle database and, according to the DBD::Oracle project, I can only access this second database with a DBD::Oracle version 1.20 or below.
I know I could possibly use the DBD version 1.20 to access both databases, but I was wondering if its possible to have installed the two versions of the DBD module and use the acceptable version for each database (less prone to errors).
I don't believe that the server version has any bearing on the DBD::Oracle version you can use, only the version of the client libraries that you install. The 9.2, 10.1, and 10.2 versions of the Oracle client libraries support connecting to Oracle server 8.1.7.4, and the latest version of DBD::Oracle remains compatible with all client libraries from 9.2 up, so I don't think that you will actually have any problem at all. However, if you install the version 11 client, you will lose the ability to connect to server versions below 9.2.0.
Install the different versions of DBI/DBD::Oracle into two different places, see INSTALL_BASE/--install_base. Access them seperately by setting PERL5LIB appropriately.
local::lib helps you automate this whole affair.
If you want to access the two database versions from the same program run you can do as follows:
install both versions in your system using local::lib
run a DBD::Proxy server with #LIB configured to load one version of DBD::Oracle
run your script with #LIB configured to load the other version of DBD::Oracle
in your script connect to one database using DBD::Oracle as usual and to the other one through the proxy.

Which Unix flavour do I need? J2EE application using IBM tools?

I want to try Unix for developing J2EE application. I use the IBM software.
WASCE as application server
DB2 Express-C as database.
Eclipse
Which Unix flavour will be most suitable for me?
According to ibm.com: WebSphere Application Server Community Edition runs on AIX, Linux, Solaris, "UNIX" (!!!), and Windows.
According to ibm.com: DB2 Express C runs on Windows, Linux, Solaris, and Mac OS X (in beta).
According to eclipse.org: Eclipse runs on Windows, Mac, and Linux.
The only Unix flavor in common to all of those is Linux. (If you move beyond Unix, Windows also works.)
Java is platform-independent. It doesn't really matter on which platform you develop - you can run your application on any other Java-supporting platform. Hence, you can develop on Windows and deploy on AIX, or develop on Linux and deploy on MacOS, or ...
The Java VM abstracts access to operating system services and resources, as does JDBC abstract the access to the database layer.
If you really mean "UNIX" and not "Linux", I would recommend Solaris (Eclipse does run on Solaris, and it's much easier to understand than AIX).
If you mean Linux too, I would recommend a distro designed for servers, like RHEL/Centos, rather than Ubuntu or Fedora. They are more likely to be stable and scalable.
I have a production environment on Centos with DB2 and Apache Geronimo (open source version of WASCE). Works like a charm. The development environment is Eclipse and Apache Geronimo on Windows and the DB2 on Centos.