I want to use the camunda rest api (local), but I realy can't figure out how to set up the environment... .
First I downloaded the tomcat distribution from here (V. 7.2.0) and the prepackaged eclipse with BPMN 2.0 Modeler from here.
I modelled a process, startet the server (start-camunda.bat) and deployed it (copied .war to ...camunda\server\apache-tomcat-7.0.50\webapps).
It went well on local tasklist http://localhost:8080/camunda/app/tasklist/default/#/login and cockpit http://localhost:8080/camunda/app/cockpit/default/).
I also downloaded the engine-rest from "Maven Nexus Server" (Install the REST API web application). Now, if I call the engine (http://localhost:8080/engine-rest/engine), I got the following .json: [{"name":"default"}]
What to do next? I realy don't know (I'm new in camunda...)
Your setup seems to be fine. But please note that the camunda REST API is a backend which you can access with a client. Currently there doesn't exists a camunda Java REST client. So you have to implement it by your self. If you are aware of that a good starting point is the camunda REST documentation. Besides Java there exists a Javascript SDK which you could use to access the REST API.
May I suggest an alternative: use a docker image for Camunda. It's official and works like a charm. You can set it up in 5 mins tops and then use an API client like postman to access Camunda's API via http://localhost:8080/engine-rest.
I had the same problem as yours and found a docker solution much easier than installing Camunda and all related dependencies myself only having to troubleshoot them later. Here's the link to the official docker image if you're interested:
https://hub.docker.com/r/camunda/camunda-bpm-platform
Or enter these 2 commands from terminal and you'll be golden:
docker pull camunda/camunda-bpm-platform:latest
docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest
Open URL with browser: http://localhost:8080/camunda-welcome/index.html
username/password: admin/admin
Related
I'm looking to build an api on a application that is going to run its own docker container. It needs to work with some applications via its REST apis. I'm new to development and dont understand the process very well. Can you share the broad steps necessary to build and release the APIs so that my application runs safely within the docker but externally whatever communication needs to happen they work out well.
For context: I'm going to be working on a Google Compute VM instance and the application I'm building is a HyperLedger Fabric program written in GoLang.
Links to reference material and code would also be appreciated.
REST API implementation is very easy in Go. You can use the inbuilt net/http package. Here's a tutorial which will help you understand its usage. https://tutorialedge.net/golang/creating-restful-api-with-golang/
Note : If you are planning on developing a production server, the default HTTP client is not recommended. It will knock down the server on heavy frequency calls. In that case, you have to use a custom HTTP client as described here, https://medium.com/#nate510/don-t-use-go-s-default-http-client-4804cb19f779
For learning docker I would recommend the docker docs they're very good and cover a handful of stuff. Docker swarm and orchestration are useful things to learn but most people aren't using docker swarm anymore and use things like kubernetes instead. Same principles, but different tech. I would definitely go through this website: https://docs.docker.com/ and implemented on your own computer. Then just practice by looking at other peoples dockerfiles and building your own. A good understanding a linux will definitely help with installing packages and so on.
I haven't used go myself but I suspect it shouldn't be too hard to deploy into a docker container.
The last production step of deployment will be similar for whatever your using if it's docker or no docker. The VM will need an webserver like apache or nginx to expose the ports you wish to use to the public and then you will run the docker container or the go server independently and then you'll have your system!
Hope this helps!
I am very new to using APIs so please excuse me. I am currently using a Python-Django App service from IBM cloud app services and the IBM Watson Discovery resouce. I have followed all the steps given here:
https://console.bluemix.net/docs/apps/tutorials/tutorial_web.html#before-you-begin
I have a machine that has docker and so the app got built successfully. However I am lost as to how I am supposed to get the front end ( which I am writing in bootstrap, javascript ) to connect to the backend and link the API.
EDIT
For example : I want my app to accept documents, feed them in Discovery, extract the keywords and sentiments and display them in the UI. How do I know what to access from the server side code and what to link where in the UI.
It is a very broad question but its a compulsory project I need to do and I am clueless. Pleaassee Help !
Before you try to integrate an API, you will need to be familiar with Python and Django. If that is not the case, then you really need to go through a series of tutorials.
Then before deploying to the cloud, you will be better off running your Django app locally on your laptop. Use pip to install the watson-developer-cloud pypi module and use the API documentation to build the python code in your Django application - https://www.ibm.com/watson/developercloud/discovery/api/v1/python.html?python#query
If none of this makes sense, then you need to brush up on your knowledge of Python, Pip, and Django.
When you have the app running on your machine, then you will be ready to package it up into either a docker image or cloud foundry container and deploy to the cloud.
I created a restful web service with java in eclipse
I used Eclipse toolkit to deploy my WS.
I'm just wondering how to test http requests? I mean there is the default URL to the app porvided by azure myapp.azurewebsites.com
but how to do a POST or GET?
and also DO I need to chose the same tomcat version when deploying my app in azure?
I have tomcat 6 on my computer, but in azure i chose tomcat 8 for example
thank you all for your answers.
I don understand your question. You can perform a GET request in any browser and a Post using tools like Postman or Fiddler (just to name a few). We can' tell you which path you have to use because it depends on your application but it should be the same as if you run it local (except the different host address). Also whether you have to choose the same tomecat version depends on your application and the component it uses - you are the only person who can answer that.
Latest since this checkin the service-connector cf plugin seems to be gone for SwisscomDev.
Official Link to the plugin simply returns a 404.
Isn't it supported anymore? What's the alternative? And did I miss communication about it?
Isn't it supported anymore? What's the alternative?
Yes. Our proprietary CF CLI client plugin is phased out. The alternative is cf ssh (from upstream). See Accessing Services with SSH on docs.developer.swisscom.com.
On Migrate from legacy MariaDB to MariaDB Ent you have a step by step howto for cf ssh. Please adapt that for your service and port.
cf ssh proy-app -L 13000:<old-db-host>:<old-db-port>
Here on #swisscomdev there is also a posting Alternative to Swisscom CF plugin named Service Connector with MongoDB Ops Manager example.
We have an edge case for an enterprise customer that may still need a cf sc feature (not available in cf ssh). Investigation ongoing.
And did I miss communication about it?
Sorry we failed in communication.
Sorry that you notice this change in our GitHub repo first. We wished to update docs first, then communicate the EOL. We somehow forgot it in yesterdays newsletter.
In fact, I'm trying to see which would be the best approach to achieve play framework native support on openshift.
Play has it's own http server developed with netty. Right now you can deploy a play application to openshift, but you have to deploy it as a war, in which case play uses Servlet Container wrapper.
Being able to deploy it as a netty application would allow us to use some advanced features, like asynchronuos request.
Openshift uses jboss, so this question would also involve which would be the recommended approach to deploy a netty application on a jboss server, using netty instead of the servlet container provided by jboss.
Here is request for providing play framework native support on openshift There's more info there, and if you like it you can also add your vote ;-)
Start with creating 'raw-0.1' application.
SSH into the server and
cd $OPENSHIFT_DATA_DIR
download and install play into a directory here. $OPENSHIFT_DATA_DIR is supposed to survive redeploys of your application.
Now you can disconnect from SSH.
Clone the application repository. In the repository, there is a file .openshift/actions_hooks/start. It's task is to start the application using a framework of your choice. The file will need to contain at least (from what I know about Play)
cd $OPENSHIFT_REPO_DIR
$OPENSHIFT_DATA_DIR/play-directroy/play run --http.port=$OPENSHIFT_INTERNAL_PORT --some-other-parameters
Important
You have to bind to $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT. Trying to bind to different interface is not allowed, also most of the ports are blocked.
To create some sort of template, save the installation steps into .openshift/action_hooks/build file. Check if play is installed, if it is do nothing, if it's not, execute the installation process.