Posts Tagged ‘install’

2 Comments Installing And Running Fabric On Windows - 12/17/09

I recently had to setup Fabric (http://docs.fabfile.org/0.9.0/) for doing deployment from my Windows machine at home.
Setting it up under Linux is very very easy but for some reasons there are a number of
issues you have to overcome when installing on Windows. I followed this page to start:

http://docs.fabfile.org/0.9.0/installation.html

First up a standard Python install (I used 2.6.2) and setup tools 0.6c11:

http://pypi.python.org/pypi/setuptools

and create a simple fabric script (fabfile.py)

 Python |  copy |? 
from fabric.api import local, env, put
env.hosts = ["elephant@babar.net:40"]
env.show = ['debug']
def deploy():
	print "Deploying...";
	put("fabtest.txt", "/tmp/fabtest.txt");
	print "All Done...";

From there:

 Bash |  copy |? 
easy_install fabric

will result in:

 PowerShell |  copy |? 
...
Installed f:\python26\lib\site-packages\fabric-0.9.0-py2.6.egg
Processing dependencies for fabric
Searching for pycrypto>=1.9
Reading http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.amk.ca/python/code/crypto
Best match: pycrypto 2.0.1
Downloading http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz
Processing pycrypto-2.0.1.tar.gz
Running pycrypto-2.0.1\setup.py -q bdist_egg --dist-dir f:\docume~1\admini~1\loc
als~1\temp\easy_install-clrpu1\pycrypto-2.0.1\egg-dist-tmp-1wszmf
error: Setup script exited with error: Unable to find vcvarsall.bat

You can solve this in a number of ways, the easiest of which is to install the binary for pycrypto manually from here:

http://www.voidspace.org.uk/downloads/pycrypto-2.0.1.win32-py2.6.exe

Next, try running fabric using: fab -f fabfile.py deploy. This results in:

 PowerShell |  copy |? 
Traceback (most recent call last):
  File "F:\Python26\Scripts\fab-script.py", line 8, in <module>
    load_entry_point('fabric==0.9.0', 'console_scripts', 'fab')()
  File "f:\python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.p
y", line 277, in load_entry_point
  File "f:\python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.p
y", line 2180, in load_entry_point
  File "f:\python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.p
y", line 1913, in load
  File "build\bdist.win32\egg\fabric\main.py", line 17, in <module>
  File "build\bdist.win32\egg\fabric\api.py", line 9, in <module>
  File "build\bdist.win32\egg\fabric\context_managers.py", line 12, in <module>
  File "build\bdist.win32\egg\fabric\state.py", line 125, in <module>
  File "build\bdist.win32\egg\fabric\state.py", line 74, in _get_system_username
 
ImportError: No module named win32api

Install the pywin32 extensions from here:

http://sourceforge.net/projects/pywin32/files/

and finally run fabric again (fab -f fabfile.py deploy), the script should run fine this time…

 PowerShell |  copy |? 
All Done...
Done.
Disconnecting from babar.net:40... done.

19 Comments Websphere Install On Ubuntu Hardy Heron - 10/12/08

I recently underwent the painful process of installing IBM Websphere 6.1 on Ubuntu Hardy Heron (8.0.4). there was one issue in particular that I wanted to share involving the process of creating a Websphere profile in order to start a server. This involves running the manageprofiles.sh file with something similar to the following:

 Bash |  copy |? 
sudo bash -x manageprofiles.sh -create -profileName
-profilePath /opt/IBM/WebSphere/AppServer/profiles/
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default/

This fails on Ubuntu with the following error message:

 Bash |  copy |? 
INSTCONFFAILED: The profile could not be created.  For more information, consult the
/opt/IBM/WebSphere/AppServer/logs/manageprofiles/AppSrv01_create.log file

Tracing through this logfile yields the following warning:

 Bash |  copy |? 
/opt/IBM/WebSphere/AppServer/profileTemplates/default/action/generateKeysForSingleProfile.ant:25:
wsadmin task failed with return code :-1

which involves running a shell script called wsadmin.sh which in turn calls this Ant script. It’s not immediately obvious, but the reason this fails is because under Ubuntu the default shell is dash rather than bash. There are two solutions to this

1. Unlink /bin/sh

 Bash |  copy |? 
sudo unlink /bin/sh
sudo ln -s /bin/bash /bin/sh

2. Reconfigure via dpkg

 Bash |  copy |? 
sudo dpkg-reconfigure dash

|