Final Version pairings for ActivePerl with Perl Dev Kit

Question: 

I want to upgrade ActivePerl and my Perl Dev Kit. What's available?

Answer: 

You may have already seen the announcement... Last year, ActiveState announced that the direction for the company's future will be OpenSource Languages.

http://www.activestate.com/blog/2016/11/activestate-open-source-language...
http://www.activestate.com/blog/2016/12/open-source-languages-company-up...

Proprietary tooling for certain languages is not part of the OpenSource Languages Company future. Sales of both of the Dev Kit tools sets were discontinued at the time of those announcements. New licenses for PDK and TDK will not be available as separate products.
http://www.activestate.com/perl-dev-kit

Engineering and Development time and resources were immediately priorized for updating the existing language distributions. In 2017, work is starting on the new languages. Work was stopped on PDK, and that means that there will not be a PDK 9.6.

Existing copies of PDK 9.5.1 cannot use the latest releases of ActivePerl. The 2203 and 2204 builds are not compatible, and all 5.24 versions remain incompatible with the final release of PDK 9.5.1.

----Update September 2017------

Since the End of Sales for PDK, there have been enough newer versions of Perl released by the Perl Community that none of ActivePerl versions compatible with the Perl Dev Kit are still Supported by the Community. With no supported, free, versions of Community Edition ActivePerl available, Users of the Perl Dev Kit will need at least a Business Edition license to access a compatible version of ActivePerl.

-------End of Update----------

2202 is the last compatible ActivePerl, except on OS X.

For OS X, the 9.5.1 release of PDK was created on OS X 10.5. Every PDK must have a 100% binary compatible ActivePerl. ActivePerls switched from building on OS X 10.5 to building on OS X 10.9 at 5.22.2.2202 and are now 64-bit only. These two factors are responsible for the unresolvable symbols error message. Since there will not be a 9.6 that is also built on OS X 10.9, the 2201 release is the last ActivePerl that is compatible.

HeartBleed vulnerability and ActivePerl

Question: 

Is my Community/Business/Enterprise Edition version of ActivePerl vulnerable to HeartBleed?

Answer: 

ActivePerl Community/Business Editions which, as shipped, are affected:
- 5.14.4.1405 - upgrade to 5.14.4.1406 (Business Edition only) or 5.16.3.1604 to fix
- 5.16.3.1603 - upgrade to 5.16.3.1604 to fix
- 5.18.1.1800 - upgrade to 5.18.2.1802 to fix
- 5.18.2.1801 - upgrade to 5.18.2.1802 to fix

Modules supplied through PPM are unaffected.
Modules compiled locally must be reviewed locally for vulnerability.

Enterprise Editions can be distinguished from Community/Business Editions by the presence of an additional fifth number before the six digit build number/version control number.
ActivePerl Enterprise Editions which, as shipped, are affected:
- 5.8.9.829.9 through 829.12
- 5.10.1.1009.9 through 1009.12
- 5.12.5.1206.2 through 1206.5
- 5.14.3.1404.2 through 1405.3
- 5.16.2.1602.2 through 1603.3

New Enterprise releases have been issued and can be located under the 2014Q1.1 folder.

HeartBleed vulnerability and ActivePython

Question: 

Is my Community/Business/Enterprise Edition version of ActivePython vulnerable to HeartBleed?

Answer: 

No Enterprise versions of ActivePython are vulnerable.

No Community/Business Edition versions of ActivePython 2.x and no Community/Business Edition versions of ActivePython 3.0, 3.1, and 3.2 are vulnerable to HeartBleed.

Only Community/Business Edition ActivePython 3.3.2.0 and 3.3.4.1 are vulnerable.
An updated 3.3 release will be needed to address the vulnerability.

Manage Changing/Dynamic IP Address in Stackato

Question: 

How To Manage Changing/Dynamic IP Address in Stackato

Answer: 

Applies to: Stackato 1.x

One of the issues with managing a portable Stackato system (e.g. a micro cloud) is dealing with having your IP address change as you move environments.

If you use a NAT-ed setup (such as with VMware Fusion), this shouldn't happen, but you may desire to move to bridged to share your micro cloud with others on the same network.

There are many services running on Stackato that are sensitive to the current IP address. When the IP address changes, you will want to run the following commands to ensure everything continues to work as expected.

Symptoms of modified IP address without reconfiguration include services not being created successfully, or the file system service hanging when trying to start your application runtime. The way to diagnose a changed IP address is to run the following as the stackato on the server:

  % grep host ~/stackato/etc/vcap/*.yml

where you should see an IP address that does not correspond to that reported by

  % ifconfig eth0

To reconfigure your system if the IP address has changed and you are running a micro-cloud:

  1. This step is not necessary if you just rebooted and have obtained a new IP address from the new network. If the machine is already running and you want to force an update of the IP address (say you have moved networks and are running a Bridged Stackato), run
      % sudo /etc/init.d/networking restart
    You will be asked for the stackato user password. Following this, you should see ifconfig eth0 has obtained a new, pingable IP address. If this does not happen, there may be an error with DHCP in your setup (e.g. locked to only known MAC addresses). Contact the local network administrator to get access to that network.
  2. Stop the current Stackato server to make the rest of the changes
      % stackato-admin stop
  3. After your IP address has changed, run
      % stackato-admin reconfigure
    This will update the config files with the current IP address.
  4. If your server had running data/msg services (mysql, fs, redis, etc.), you must run
      % stackato-admin update-services-ip [newip]
    This will update the cached controller database IP references for the existing applications.
  5. Now restart the Stackato system and you are ready to go.
      % stackato-admin restart

Use PHP Sessions in Stackato VM

Question: 

How to handle PHP sessions in Stackato VM

Answer: 

Applies to: Stackato 1.x, 2.x

One of the issues with managing a custom PHP application with multiple instances in Stackato is dealing with user sessions.

Because of Stackato's architecture, a user of your site may not access the same server that started their session for each subsequent HTTP request. Based on traffic at any given moment, the router in Stackato 1.2.6 will direct requests to any DEA associated with your app. This will be improved in a new version of the router.

A simple solution is to store the user session in a shared location on the persistent file system. If your custom PHP application stores sessions in a database, you do not have to worry about this issue.

1. Add a new filesystem service in stackato.yml file:

        services:
           session-fs: filesystem

2. Override the default location for storing session variables by inserting this before the session_start() function call. This is usually located at the top of most PHP files.

        ini_set("session.save_path", "/app/fs/session-fs");
        session_start();

Unfortunately, you can not set this inside php.ini in Stackato.

Set Static IP in Stackato

Question: 

How do I set a static IP for my Stackato VM

Answer: 

In Stackato 2.4, you can use the command "kato op static_ip" to easily set static IP in Stackato. (Strongly Recommended)
http://docs.stackato.com/reference/kato-ref.html#kato-command-ref-op

In versions prior to Stackato 2.4, it's fairly simple to set a static IP address. The main file you will need to edit is:

/etc/network/interfaces

Look for the line that starts with 'eth0' and modify it so it looks similar to the following (modify for your network settings where appropriate)

auto eth0
iface eth0 inet static
        address 192.168.68.123
        netmask 255.255.255.0
        network 192.168.68.0
        broadcast 192.168.68.255
        gateway 192.168.68.1
        dns-nameservers 192.168.68.2

We also use resolvconf to manage DNSmasq settings for the LXC containers so be sure to also edit /etc/resolvconf/resolv.conf.d/base and add your DNS servers there, example:

nameserver 192.168.68.244
search     <your top level domain (i.e: 'activestate.com')>

Then restart the networking:

sudo /etc/init.d/resolvconf restart
sudo /etc/init.d/networking restart

Configuring your application to use the persistent file system

Question: 

How to configuring a application to use the persistent file system in stackato?

Answer: 

Applies to: Stackato 1.x, 2.x

A persistent file system service allows apps to do the following:

1. Share files across multiple instances of an app
2. Store files that persist if an app is removed (providing the service is not deleted) or if the server is restarted.

Below we will go through how we customized our WordPress installation to use the persistent file system. Before you begin, find out where all the user generated contents are saved. In WordPress, they are stored in wp-content folder.

Therefore we add the following to our stackato.yml::

services:
  fs-wp: filesystem

hooks: 
  post-staging:
    # create wp-content in the shared filesystem
    - mkdir -p "$STACKATO_FILESYSTEM"/wp-content 

    # migrate existing wp-content data into the shared filesystem
    - mv wp-content/* "$STACKATO_FILESYSTEM"/wp-content
    
    # remove unused wp-content directories
    - rm -rf wp-content
  
    # link to wp-content folder in the shared filesystem
    - ln -s "$STACKATO_FILESYSTEM"/wp-content wp-content

That's all! You may have to make modifications to this general approach if your application requires stores user generated content in more than one location.

New to Go on Windows

Question: 

I'm new to Go. I've installed ActiveGo. How do I get started?

Answer: 

Start here:
http://docs.activestate.com/activego/1.8/doc/code.html
The introduction will explain how your workspace is arranged. In case you missed it, your $GOPATH has already been set by the ActiveGo installer.

If you don't use Git already, you should install it and learn how to use it. Git is an essential supporting tool for coding in Go.

There's a simple HelloWorld program in the Go introduction.

ActiveGo sets up local documentation on your system as a document server. On the local ActiveGo documentation start page, there is an interactive Sandbox window labelled "Try Go". You will see the source code before it compiles. When you click "Run" the code compiles and displays the result in the box below the source code. There's a pull-down with a small set of sample Go snippets.

Multiple versions of Go

Question: 

Can I have ActiveGo and another distribution of Go installed together?

Answer: 

The ActiveGo-beta will set GOROOT, GOPATH, and PATH variables. The Golang distribution will also set GOROOT and PATH.

-ActiveGo will always be the default version of Go if both are on the system due to the ways both Go versions set up PATH. Neither ActiveGo nor Golang Go will remove the other distribution from PATH.

-Any value in GOROOT will be overwritten by both versions of Go when they install. The last version to install will be set up as the root. If you remove a version of Go, you will need to re-install/repair the other one to ensure that GOROOT is correct before you start using it.

-GOPATH is your personal workspace. Your workspace should be usable with either version of Go.

ActiveState PPM Availability and the 401 error

Question: 

PPM gives me a 401 Authorization Required. Why?

Answer: 

--------
UPDATE (Oct 2016): This FAQ was originally posted in 2010. If you are running a version of ActivePerl that gets a 401 error when it contacts a Business Edition Only repository, our advice has evolved. Now, you should replace that ActivePerl.

A "401" error when contacting PPM should now be treated as a indication of obsolesence.

Later versions of ActivePerl that fully support Business Edition Licences have a more informative error message instead of the basic "401". Old ActivePerls that can only report a "401" will not support a Business Edition licence if one is installed. An ActivePerl that reports a "401" from PPM is probably not compatible with your current operating system either.

---------
Original FAQ:

The repository you are accessing contains exclusively Business Edition content. If you do not have a Business Edition license installed on the system, the PPM server will advise that you are not permitted to access the directory.

Perl versions move into Business Edition when the Perl Community is no longer actively supporting that version of Perl. ActiveState policy for PPM is that free and open access to PPM binary modules for versions that have moved entirely into Business Edition will continue for *at least* six months beyond the date at which the no Community Edition versions of that Perl are available.

All versions of Perl 5.8 and 5.10 required Business Edition licensing in 2010. ActivePerl 5.8 builds older than build 829, and ActivePerl 5.10 builds older than 1008 must use the manual download process described in this FAQ:
http://community.activestate.com/node/8128

All versions of Perl 5.12 required Business Edition licenses as of September 2012. All ActivePerl 5.12 builds can use the normal PPM client with a Business Edition license installed, or the manual download process.

ActivePerl 5.14 requires a Business Edition license as of October 2013 for access to installers. PPM access for modules other than the installers remains free as of December 2013.