Discussion:
[Fab-user] fabric run
王旭舟
2014-11-10 15:17:24 UTC
Permalink
Hello ,I have trouble about fabric v1.9.1

I¡¯m working for aix operating system,and now when run oracle script to
deploy data

Ex. run(¡°sqlplus¡±), It will show error to me that sqlplus is not found,

I have configuration the .profile where oracle_home is, but it don¡¯t help
as all.

Now I have to set

run("export ORACLE_BASE=/oracle/app && \

export ORACLE_HOME=$ORACLE_BASE/product/11.0.1/db_1
&& \

export PATH=$ORACLE_HOME/bin:$PATH && sqlplus")

But in fact ,It not beautiful for code , and not every environment is the
same, so please help me to solve this problem.
Brandon Whaley
2014-11-10 16:58:00 UTC
Permalink
In this case, I'd probably use the prefix feature of fabric to have
all of your exports set automatically for any run() calls.

http://docs.fabfile.org/en/1.10/api/core/context_managers.html?highlight=prefix#fabric.context_managers.prefix

If you don't want to do that, you should try to emulate what fabric is
running and fix the remote environment so those commands work. Debug
helps with this:
http://docs.fabfile.org/en/1.10/usage/output_controls.html?highlight=debug#debug-output
Post by 王旭舟
Hello ,I have trouble about fabric v1.9.1
I’m working for aix operating system,and now when run oracle script to
deploy data
Ex. run(“sqlplus”), It will show error to me that sqlplus is not found,
I have configuration the .profile where oracle_home is, but it don’t help as
all.
Now I have to set
run("export ORACLE_BASE=/oracle/app && \
export ORACLE_HOME=$ORACLE_BASE/product/11.0.1/db_1
&& \
export PATH=$ORACLE_HOME/bin:$PATH && sqlplus")
But in fact ,It not beautiful for code , and not every environment is the
same, so please help me to solve this problem.
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
Loading...