Patchin a car file made for ESB WSO2 - packaging

I have build a car "carbon" file for a ESB WSO2 server, what i want to do now is to patch the car file and update an existing sequence into it!
I know in JAVA you can do this using "jar uf foo.jar foo.class" form "http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/jar.html"
is this possible for Car files too ?
the idea is to override the already existing sequence inside!

Try the following,
mv YOUR_CAR.car YOUR_CAR.zip
zip -u YOUR_CAR.zip <file to update>
mv YOUR_CAR.zip YOUR_CAR.car

Related

How to perform Mongodb CDC using wso2 streaming integrator?

I'm so confused I don't know how to perform mongo cdc with wso2 streaming integrator. I set up a mongo replicaset follow this doc. I config cdc source like below,
but it doesn't work, I got these error logs . Can any one help me to fix this? Thanks in advance.
It seems like an issue with the extension installer script of the WSO2 SI. The mongo_java_driver is actually a bundled jar and due to that it should not be converted again into a bundle.
So to fix your problem, Follow the below steps,
Step 1- Uninstall the installed MongoDB jar.
Step 2- Go to WSO2SI_HOME/wso2/server/resources/extensionsInstaller folder and open the extensionDependencies.json file.
Step 3- Search for "name": "mongo-java-driver" and under the configurations usage type from "JAR" to "BUNDLE".
Step 4- reinstall the MongoDB extension via extension installer
This will solve your problem.
Have you copy the mongo-java-driver to <PRODUCT_HOME>/lib directory? it seems like the cdc extension couldn't locate the mongodb drivers

How to install MuleSoft in RHEL 7?

Can anyone please summarize, how to install mulesoft runtime on RHEL step by step process ?
Suppose I have download tar file and extracted them , for running I have used under bin ./mule . Is this enough or I need to configure any additional datas etc ? How to archive this ?
Below is the step for Mule 3.5.2, this can be used for other mule version too -
Steps -
Login to RHEL server.
Copy mmc-distribution-mule-console-bundle-3.5.2-HF1.tar.gz (downloaded from Mulesoft support portal) to /data/mule folder.
(In case of production setup, this file can be copied from Mule staging server from /home/ directory)
Go to /data/mule directory
Unzip mmc-distribution-mule-console-bundle-3.5.2-HF1.tar.gz using the following command
gunzip mmc-distribution-mule-console-bundle-3.5.2-HF1.tar.gz
Extract mmc-distribution-mule-console-bundle-3.5.2-HF1.tar using the following command
tar -xvf mmc-distribution-mule-console-bundle-3.5.2-HF1.tar
Move mule-enterprise-3.5.2 folder from mmc-distribution-mule-console-bundle-3.5.2-HF1 to the current directory ( /data/mule ) using the command
mv mmc-distribution-mule-console-bundle-3.5.2-HF1/mule-enterprise-3.5.2/ /data/mule
Delete the folder mmc-distribution-mule-console-bundle-3.5.2-HF1, as the remaining contents (MMC and other scripts) are not needed
rm -rf mmc-distribution-mule-console-bundle-3.5.2-HF1
Delete mmc-distribution-mule-console-bundle-3.5.2-HF1.tar file
rm mmc-distribution-mule-console-bundle-3.5.2-HF1.tar
Create a soft link /data/mule/mule-enterprise to point to /data/mule/mule-enterprise-3.5.2 using the following command.
ln -s mule-enterprise-3.5.2 mule-enterprise
Go to /home/ directory and change MULE_HOME environment variable in /home/.bash_profile, from /data/mule/mule-enterprise-3.5.0 to /data/mule/mule-enterprise
Execute the following command (from /home/ directory)for having the latest value for MULE_HOME in the current context
source .bash_profile
Go to $MULE_HOME ( /data/mule/mule-enterprise ) and delete .mule folder
rm –rf .mule
Installing Enterprise Licence
Steps -
Copy the license file mule-ee-license.lic to $MULE_HOME/bin directory
Go to $MULE_HOME/bin and run the following command to install license
mule -installLicense mule-ee-license.lic
Mule removes the trial license and replaces it with the enterprise edition license. In the $MULE_HOME/conf directory, Mule saves a new file called muleLicenseKey.lic
To verify that Mule successfully installed your Enterprise license, run the following command
mule –verifyLicense
If the licence installation is successful, the following text is displayed in the output.
Valid license key --> Evaluation = false, Expiration Date = Wed Dec 31 00:00:00 GMT 2014, Contact Name = Sanjeet Pandey, Contact Email Address = sanjeetkumarpandey#gmail.com, Contact Telephone = 07831792088, Contact Company = PERSONAL, Contact Country = UK, Entitlements = clustering,datamapper
please follow this link for step by step guide:
http://intrgrex.com/installing-mule-as-a-service-on-linux/

From where my package openvpn getting installed?

When I write in my recipe:
package "openvpn" do
action :install
end
The package is being installed, but
I want to know where my package is installing from.
I want to do it differently - I want to download the openvpn software and put it in S3 from there I want to get it back.
package "openvpn" do
action :install
end
remote_file "\etc\openvpn" do
source "I want to take it from S3"
action :install
end
Can I do it the second way if yes my package name should be openvpn or something else.
Openvpn is packaged by Ubuntu, so it is coming from the Ubuntu package repository. Chef uses the apt package provider for the package resource. This means while you say package "openvpn" in your recipe, under the covers Chef looks at the node's platform (e.g., ubuntu 12.04) and uses apt-get install to install it. If you were using CentOS, it would use yum instead.
If you want to use S3 to store a config file, you would specify the source as the URI to the actual file with remote file:
Example:
remote_file "/etc/openvpn/openvpn.conf" do
source "https://your-bukket.s3.amazonaws.com/openvpn.conf"
action :create
end
If the bucket is private, you'll need to use an alternative resource such as aws_s3_file from Opscode's "aws" cookbook. See the README for information about how to use that resource - it passes in the AWS credentials to access the item in the bucket.
If you want to provide your own openvpn package and download it from S3, you can do so with this:
remote_file "/tmp/openvpn-VERSION.deb" do
source "https://your-bukket.s3.amazonaws.com/openvpn-VERSION.deb"
action :create_if_missing
end
dpkg_package "openvpn" do
source "/tmp/openvpn-VERSION.deb"
action :install
end
(Replace VERSION with your actual version, or otherwise change the filename to suit your preferences)

WSO2 Hive analyser script result set

I am using WSO2 ESB 4.5.1 and WSO2 BAM 2.0.0. In my Hive script I am attempting to get a single value and assign it to a variable so I can later use it in SQL statements. I can use a variable using hiveconf but I'm not sure how to assign a single value from result set to it.
any ideas?
Thanks.
You can extend the AbstractHiveAnalyzer and write you own class which executes the query and set the hive conf value, similar to this summarizer. Here you can see the execute() method should be implemented and this will be called by BAM. Here you can add your preferred query and assign the hive conf with 'setProperty("your_hive_conf", yourResult.string());'.
You can build your java application as typical '.jar' file or osgi bundle. If you have packaged as just a '.jar' file, then you should place the jar in $BAM_HOME/repository/components/lib. If you packaged the application as osgi bundle, then place the file in $BAM_HOME/repository/components/dropins folder. And restart BAM server.
And finally in your hive script that you add in BAM, you should include you extended class as 'class your.package.name.HiveAnalyzerImpl;', so that BAM will run the execute() method which you have implemented in your class and your hive conf will be set. And then, value you have set for your hive conf can be used in the hive script as ${hiveconf:your_hive_conf}.
Hope this helps.

Creating a new Trac project via trac-admin initenv

I'm somewhat new to Trac.
I'm running trac version 0.11.7 on an ubuntu system.
I'm trying to create another project via the following command:
"trac-admin /var/lib/trac/shipping_tracker initenv".
After answering the various questions, the program fails and returns an error
( see: http://pastebin.com/yijzpB3i ) "Table 'system' already exists"
Does this mean that every-time I need to create a new project, I'll have to go into
the mysql database and create a new database, like trac1, trac2, etc??
I did notice this particular ticket ( http://trac.edgewall.org/ticket/5138 ) where
someone states you have to create a new database for each project. Is this correct??
Thank you.
--Mike
Every Trac environment, being a completely self-contained space, uses a separate database. So yes, you need to create a new database for each environment (although it might be a bad idea to name them trac1, trac2 etc.).
If you want to create new environments often, what you really need is probably multi-project support, which allows you to have different projects within one environment. However, it is still not done as of Trac 0.13, and is planned for 0.14.
You might also want to read about various ideas on having multiple projects with Trac. One of them deals with making Trac store multiple environments in a single database, though it might be outdated and probably breaks automatic updates.
I am using Trac 1.0, running as a stand-alone server, and in order to run multiple projects on one trac installation you still need to set up new environment using
trac-admin /path/to/trac/yournewpoject initenv
... then create .htpasswd file in the /path/to/trac/yournewpoject dir, add users using
htpasswd /path/to/trac/yournewpoject/.htpasswd newuser
(or copy an existing .htpasswd file there) ... and then restart trac with similar to the followin command:
python /path/to/tracd --user=yourlinuxuser --group=yourlinuxgroup -d \
-b hostname -p 8000 \
--basic-auth=oldproject,/path/to/trac/oldproject/.htpasswd,realmname \
--basic-auth=yournewpoject,/path/to/trac/yournewpoject/.htpasswd,realmname \
/path/to/trac/oldproject \
/path/to/trac/yournewpoject
This is valid in case you are using the same type of basic authentication as I do.