I have installed Cygnus and I have it properly running with MYSQL. I would like to send the data which arrive to Cygnus through the notifications from Orion Context Broker, to a REST server.
I need to create a new Sink that processes the data that come from Orion, create the POST requests and run them. In order to do this, I have to create new Java files and I have to put these files in (according to "Adding new sinks development guide"):
fiware-connectors/flume/src/main/java/es/tid/fiware/fiwareconnectors/cygnus/sinks
and:
fiware-connectors/flume/src/main/java/es/tid/fiware/fiwareconnectors/cygnus/backends/<my_backend_classes>/
But I can not find these places. I installed Cygnus through the yum install command, so I do not know how to locate the places where I have to place these new java files.
Could you help me with this? Thanks in advance
Installing Cygnus by RPM will not install the sources. For that, you have to clone the Github repo (the git tool must be installed as well):
$ git clone https://github.com/telefonicaid/fiware-cygnus.git
That will clone the master branch, which is currently synchronized with the release 0.7.1.
Then, once you have added your new sink, you will have to build and install Cygnus from sources (your altered ones) as explained here.
Related
I use Elastic Beanstalk. And it was connected with Code Commit.
I want that if I push to Code Commit repository, EB CLI or Code Commit automatically deploy this version to elasticbeanstalk
Can I do this?
You can create a script that periodically polls CodeCommit for new changes. When there is a new change, the script can trigger:
git clone <codecommit repository>
eb init -p <platform name>
eb create/eb deploy
of course, you probably don't need to clone every time, but this is basically how Jenkins works. In fact, you can just use Jenkins to poll CodeCommit. Any time there is a new commit detected, Jenkins will build it using the EBCLI.
CodePipeline
AWS CodePipeline is a continuous delivery service you can use to model, visualize, and automate the steps required to release your software. You can quickly model and configure the different stages of a software release process. AWS CodePipeline automates the steps required to release your software changes continuously.
https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html
Configure a pipeline with CodePipeline. When GitHub or CodeCommit is configured as the source stage, every single commit will trigger your pipeline to execute. When Beanstalk is configured as a deploy stage, it will automatically deploy whatever new code is going through the pipeline.
I have working app on OpenShift server. My question is - how to update openshift's git repo of my application, if I make some changes using ssh acsess to openshift? I mean not using all this stuff with pull/push to my local mashine.
If I understand you correctly, you would like to modify source code without using git. I am not sure why you would want that. All that stuff with pull/push gives you a version control flexibility which can save you a lot of time when you screw up one thing. For example, you push brand new UI to production, which turns out to be buggy. With git, you have flexibility to revert back to previous version, and work on different branch to fix the bug on UI.
OpenShift follows conventional app structure. Git for source control, maven for build, jbosseap(for example) for app server, jenkins for continuous integration, etc. So, when you push using git, OpenShift will automatically build using maven, then deploy to the server.
If you would like to disregard all that advantages that OpenShift has to offer, use rhc ssh appname to directly work on the server.
I would like to connect my web application (running on tomcat 7) to MySQL (v5.6.20). It is ok if I include the driver mysql-connector-java-5.1.31-bin.jar into my web application. But would like to have it for all my apps. On my local computer, I put the file in tomcat/lib and everything is fine.
How to do the same with openshift? Is it a bad idea to do so?
I am a total beginner. What I do to upload my application (war files) is
git add --all
git commit --m "text"
git push
Thanks a lot for your help!!
Here are two KB articles from the Help Center that I think will help you get going, the first shows how to use the pre-configured database connections that come with each of the Java containers on OpenShift (https://help.openshift.com/hc/en-us/articles/202399720-How-to-use-the-pre-configured-MySQLDS-and-PostgreSQLDS-data-sources-in-the-Java-cartridges), They are very easy to use.
The second shows you how to include external libraries (jar files) inside your application without using maven (https://help.openshift.com/hc/en-us/articles/202399730-How-to-include-libraries-jar-files-in-your-java-application-without-using-Maven).
A third option, if you are using a Maven based project (similar to the default applications that come with the Java cartridges), is to add the mysql driver as a dependency to your pom.xml file, and it will be loaded into the correct place in your application when you do a git push. If you want to go that route, I think that this article will help: http://www.java-tutorial.ch/core-java-tutorial/mysql-with-java-and-maven-tutorial
I have a Mercurial repository (on Bitbucket) with some code (Java) and I want to do CI builds on a cloud-based Jenkins server (at Jelastic, running on CentOS). My problem is that I haven't been able to do a proper installation of Mercurial on the Jenkins server.
The Jenkins build fails with the following message:
ERROR: Failed to clone https://bitbucket_jenkins_user:some_password#bitbucket.org/repo_owner/my_repository because hg could not be found; check that you've properly configured your Mercurial installation
Setup information
It's a private Mercurial repository, hosted at Bitbucket
In Bitbucket I have set up a Service to trigger the Jenkins build, after a Push has happened
I have defined a specific bitbucket jenkins user in my Mercurial repository, it has only read rights and it logs in using simple https authentication
Jenkins runs on a Tomcat 7, hosted in a Jelastic cloud environment, on CentOS 6
The Mercurial plugin was installed through the Jenkins interface, by Manage plugins
The build is configured as being triggered remotely (by the service defined in Bitbucket)
Build results are the same when started manually and when triggered from a push to the repository
When I first did this I was under the impression that installing the Mercurial plugin in Jenkins would be enough, that it would also install the needed Mercurial binaries to be able to connect to the repository and get the code. I have realized that I was wrong and that on the Manage Jenkins / Configure System page I need to specify my Mercurial installation.
Questions
Is it possible to create a Mercurial installation without ssh access and doing a "yum install mercurial"?
In the Jenkins interface, what can I specify when choosing the "Install Automatically" option?
When defining an installer, I have experimented with the "Extract zip/tar.gz" option, but what can I write as the "Download URL for binary archive"?
Jenkins also offers an installer option of "Run command". What kind of commands could that be, maybe a "yum install ..." or "rpm ..."?
Since my server is cloud based, getting ssh access is a paid add-on which I would prefer to avoid. But if that is my only option I will of course do it, thereby getting access to running commands on the server. However, running "yum install mercurial" on Centos seems to only give the 1.4 version of Mercurial. Current version when I write this is 2.6.3, would I need to download the sources and compile it myself or is it possible to get that as a binary for Centos somewhere?
The Mercurial Plugin page has a section on how to use the Auto Installation options to install Mercurial using ArchLinux packages.
"The plugin supports generic tool auto-installation methods for your Mercurial installation, though it does not publish a catalog of Mercurial versions. For users of Linux machines (with Python preinstalled), you can use ArchLinux packages. For example, in /configure under Mercurial installations, add a Mercurial installation with whatever Name you like, Executable = INSTALLATION/bin/hg, Install automatically, Run Command, Label = linux (if desired to limit this to slaves configured with the same label), Command = [ -d usr ] || wget -q -O - http://www.archlinux.org/packages/extra/i686/mercurial/download/ | xzcat | tar xvf - (or …/x86_64/… for 64-bit slaves), Tool Home = usr, and configure a job with this installation tied to a Linux slave."
see https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin
I'm really new with SCM systems, so I'm starting to study Mercurial, but I'm facing a problem that I have no idea how to fix. I hope someone can point me the right direction :-) :
So, I have installed the BitNami Redmine Stack (http://bitnami.org/stack/redmine) on a Vmware computer with windows 2003 (64 Bits) as the OS. On the same VM I have installed Mercurial-2.3 (Mercurial 2.3 Inno Setup installer - x64 Windows - does not require admin rights) , and restarted. after that , created a directory (e:\helloworld) and I have initialized the directory with some basic the HG commands (HG Init, HG Add, HG Commit).
Using the host computer to confirm the correct communication with the VMWare guest computer, I have created a small project in Redmine, added a repository with Mercurial as the SCM and included the initialized directory (e:\helloworld on the server). The repository is displayed correctly in Redmine, and, working directly in the virtual computer if I do some changes and perform some commits, the changes are displayed in the Redmine repository. From my current limited knowledge, all seems to be ok when I work directly in the VM, but when I try to clone the directory using HG clone from the host computer, the server responds:
C:\helloworld>hg clone http://redminevm/redmine/projects/helloworld
abort: HTTP Error 406: Not Acceptable
I also have tried with the IP address instead of the hostname, adding the username and the password to the URL, or initializing the local folder previous to try the hg clone. all my attemps return the same result. I'm assuming something is incorrect in the server, but I have no idea what it can be.
What should review on the server (or Client), in order to allow me to clone the Mercurial repository thru http?
Thank you very much in advance!
Alex.
Ok, after investigating, and with a big help from the Redmine forum, I can answer my own question. I hope my experience can help someone. My question was because of lack of knowledge about Redmine and what it can and cannot do.
so;even if we can have repositories in a RedMine project, RedMine is not a repository server. Means I can link a repository to a project, but, if I want work on it thru http (or serve multiples repositories) , aditionally I need install a server like rhodecode, or use hg serve. :-)
Saying this, I was doing this incorrectly. After running hg serve , I was able to serve multiples repositories.
Same error if you want to clone a git repo with "hg clone". Yeah, I know, I'm an idiot, but it happens, probably this will help someone.