Tuning of Cloudify Java parameters - cloudify

I am using Cloudify 2.7 with OpenStack Icehouse.
I would like know if it exists a documentation about the tuning of Cloudify JVM parameters.
For example, how should I configure correctly the gs.properties file into the /config directory?
Does it exist other files I should configure?
Thanks

Cloudify JVM parameters are configured using the cloud driver configuration file. There are advanced settings to tweak both memory and port settings. These are available here:
http://getcloudify.org/guide/2.7/bootstrapping/advanced_cloud_driver_usage.html
For instance:
rest {
//Rest port
port 8102
minMemory "128m"
maxMemory "64m"
}

Related

ERROR: Nginx is not configured as a service

when configuring the loggly agent for nginx it returns. ERROR: Nginx is not configured as a service. Is there something missing in a configuration file?
Looking at Loggly's nginx install script I saw, that it's just checking SysV init.
Obviously you've setup a new Box, using Systemd instead of SysV init. The Loggly installer fails with Systemd; they have to update their scripts.
You'll have to configure all the stuff manually for the time being.

How to set log level for Payara Micro

I have a project where I need to run javaee7 microservice with payara micro.
For this reason, I build a payara uber jar with maven, so I can just run it as
java -jar MicroService.jar
(http://blog.payara.fish/creating-uber-jar-with-payara-micro )
How can I set the logging level for payara, so that only warnings and errors are displayed, without INFO?
You can specify an alternative logging.properties file using --logProperties option followed by path to the file. This is not documented in the official documentation, but you can get a brief info about it when you execute java -jar payara-micro.jar --help.
You can find a template logging.properties file when you create a domain directory by running a plain Payara Micro with the --rootDir argument - it will copy all documentation from the JAR file into the specified folder (the folder must exist - might be empty). You can find logging.properties in config/logging.properties, take it, edit it, and pass it to Payara Micro using the --logProperties argument.
If you want to specify log levels within the uber JAR, without adding a separate logging.properties file, you may configure the logging either by running appropriate asadmin commands from within your application or directly setting log level on JUL loggers using LogManager API.

Docker: how to manage development and production settings?

I'm just getting started with Docker. With the official NGINX image on my OSX development machine (with Docker Machine as the Docker host) I ran up against the bug with sendfile and VirtualBox which means the server fails to show changes I make to files.
The workaround for this is to use a modified nginx.conf file that turns off sendfile. This guy's solution has an instruction in the Dockerfile to copy a customised conf file into the container. Alternatively, this guy maps the NGINX configuration to a new folder with modified conf file.
This kind of thing works OK locally. But what if I don't need this modification on my cloud host? How should I handle this and other differences when it comes to deployment?
You could mount your custom nginx.conf into the container in development via e.g. --volume ./nginx/nginx.conf:/etc/nginx/nginx.conf and simply omit this parameter to docker run in production.
If using docker-compose, the two options I would recommend are:
Employ the limited support for environment variable interpolation and add something like the following under volumes in your container definition: ./nginx/nginx.${APP_ENV}.conf:/etc/nginx/nginx.conf
Use a separate YAML file for production overrides.

Running jenkins behind proxy, reverse proxy not configured properly

When running behind proxy (NGINX) I get message
It appears that your reverse proxy set up is broken.
I referred to this link, but still get the same message. It refers to file /etc/default/jenkins which is not the case for me as I downloaded the zip file and am running in glassfish.
As I understand all I need is to provide argument --prefix to JENKINS_ARGS. How do I do that when running in glassfish behind nginx.
Thanks.
Just a quick guess but if you run Jenkins inside of GlassFish I think you have to set the proxy on the GlassFish JVM.
You can either add the following JVM options via the GlassFish admin GUI (server-config -> JVM Settings -> JVM Options):
-Dhttp.proxyHost=proxyhostname
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=proxyhostname
-Dhttps.proxyPort=8080
or you can set them via asadmin in the following way:
asadmin create-jvm-options -Dhttp.proxyHost=proxyhostname

compilation problems after setting classpath in tomcat 5.5

I have installed Tomcat 5.5 in windows vista home basic. I have set classpath to
"C:\program files\apache software foundation\tomcat 5.5\common\lib\servlet-api.jar".
now there are two problems.
1. I could not compile my servlets. It says package javax.servlet.* dosenot exist.
2. I could not connect with local host in chrome nor in explorer.
these errors are appearing inspite of server instance running.
Classpath to java sdk and tomcat are different. is it the matter of concern.
Please help.
I have invested considerable amount of time figuring out the problem.
thanx in advance.
I could not compile my servlets. It says package javax.servlet.* dosenot exist.
It means that the classpath for javac is not been correctly specified. It should go like so:
javac -cp .;"/path with spaces/to/servlet-api.jar" com/example/YourServlet.class
Note that you need to surround a path with spaces by doublequotes.
I could not connect with local host in chrome nor in explorer. These errors are appearing inspite of server instance running.
Then you used the wrong domain/port. When running Tomcat at the local machine, the domain should at least be localhost. The actual port can be determined in Tomcat/conf/server.xml file. It defaults to 8080, but can be changed during the Windows setup wizard. The final URL should look like http://localhost:8080. If you use port 80 which is the default HTTP port, then the :80 part can be omitted from the URL.
Classpath to java sdk and tomcat are different.
The %CLASSPATH% environment variable is worthless. Use -cp argument. If you want to avoid long typing/remembering everytime, consider using a .bat file with the command, or a build tool like Ant, or an IDE like Eclipse.
The %JAVA_HOME% environment variable is however important. Tomcat needs to know it in order to have access to the toolset to compile JSP files. The %JAVA_HOME% should point to the installation directory of the JDK.
I have set classpath to "C:\program
files\apache software
foundation\tomcat
5.5\common\lib\servlet-api.jar"
If this means CLASSPATH environment variable, you're learning a valuable lesson: it's worthless. javac.exe and java.exe ignore it; so do all Java EE app servers like Tomcat; so do all IDEs like IntelliJ.
You'll have to add servlet-api.jar to your CLASSPATH using javac.exe -cp every time you compile in a command shell, or add it to your IDE project CLASSPATH, or set it up in Ant.
If you can't connect to localhost using Chrome or Explorer, it probably means that you haven't packaged or deployed your app properly. Make sure you create a valid WAR file and put it in the Tomcat 5.x /webapps directory to deploy.

Resources