We are using DropWizard to create java applications running as a server inside a docker container.
Command to create such applications is as below -
java -jar service-name.jar server service-name.yml
service-name.yml is a file that holds all configuration settings.
Can you suggest how do we configure application insights inside this yml file?
I don't know how DropWizard configuration reading works. But if there are hooks in the code to read the configuration, you can read all the configuration required for ApplicationInsights and manually configure in your code using TelemetryInitializers.
Related
Is the a configuration file for Cloudera Management Service?
I'd like to have the service roles' configuration stored in repository. This way, service configuration can be shared between environments without the need to change the configuration via CM ui or rest API on each environment.
Cloudera deploys configs for those dynamically when service is started by agent, for example Service Monitor will end up in /run/cloudera-scm-agent/process/XXXXX-cloudera-mgmt-SERVICEMONITOR
Config itself is stored in database, in configs table.
So I would say that your only solution (sadly) is to manage config via api. Client libraries for that are pretty friendly though.
My .NET Core application is using Config Server which is referencing the configuration values which are stored in .yml at Git repo.
Do we need to restart the application once the configuration value updated in Git to get the value to be reflected?
I wanted to understand is this the expected scenario or am I missing something else?
Yes, this is how it works by default. You can configure whether the cofiguration will be fetched from git, or from the cloned config in the config-server's memory with the 'refreshRate' configuration.
See documentation for more informationt:
https://docs.pivotal.io/spring-cloud-services/2-0/common/config-server/configuring-with-git.html
I am deploying a Spring Boot application to AWS Elastic Beanstalk using AWSCLI. I want to put an external application.properties file containing customer specification configurations (database credentials, etc.) in the same directory of the application. The application should pick up this properties file. How can I accomplish that? Are there any alternatives?
Spring Cloud Config
This project allows you to use an external, centralized configuration repository for one or more applications. You don't need to rebuild your application if a property changes. You can simply change the property in your configuration repository and even push the changes to all of your applications.
See this Getting Started Guide.
This above approach is what I would recommend for the scenario you described. I would not bother with having a separate directory on the application server for your configuration files. Spring Cloud Config is a great approach as it solves the problem you described and a few more.
You can alternatively specify them in an application-prod property like
server.port=5000
spring.datasource.url=jdbc:mysql://${RDS_HOSTNAME}:${RDS_PORT}/${RDS_DB_NAME}
spring.datasource.username=${RDS_USERNAME}
spring.datasource.password=${RDS_PASSWORD}
spring.jpa.hibernate.ddl-auto=create
and specify an environment variable called SPRING_PROFILES_ACTIVE with the value prod making the beanstalk smart enough to pick values from out there.
How I can set for example Path to urlGenerator.php if I using deployment connection to my project, and this file is generated on virtual machine. I don't want to synchronize that files to my local computer...
The connection to deployment is through sftp.
Symfony plugin configuration:
Deployment configuration:
I have added a remote action button and also multiple routing files in a new menu entry. you can now add remote files. just update to 0.11.111
https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/685
Currently, I am deploying both "share.war" and "alfresco.war" on same tomcat server.
So, how can I separately deploy "share.war" and "alfresco.war" on different tomcat servers?
I want to deploy "share.war" on tomcat server 1, deploy "alfresco.war" on tomcat server 2.
If you're looking for a way to embed Alfresco in your application, you should check this old but still mostly valid webinar.
If you want to have a quick start at running Alfresco outside any application container (i.e. directly bootstrapping the Spring context) the FirstFoundationClient sample in the Alfresco SDK is what you need.
This is really much more simple than it seems. Deploy the wars on separate tomcats, and then configure share-config-custom.xml inside /shared/alfresco/web-extension on the Share deployment to point to the Alfresco repository. It's that easy.
From a copy-paste of the official documentation :
You can run the Share application in a separate Tomcat instance from
the instance running the Alfresco WAR. This additional instance can be
installed on the same server as the original Tomcat instance, or it
can be installed on a separate server.
Install a new Tomcat instance on the same server at the original Tomcat instance.
Modify the /conf/server.xml file for the new Tomcat instance:
Change the port number (for example, to 8006) in this line:
<Server port="8005" shutdown="SHUTDOWN">
Change the port number (for example, to 8180) in this line:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ....
Move the share.war file from the original Tomcat /webapps directory to the new Tomcat /webapps directory.
(Optional) Configure the original Alfresco Tomcat deployment.
Start the original Tomcat.
You can use Alfresco supplied batch files.
If you are running the Share Tomcat instance on a separate machine, you must modify the override file in the Share Tomcat web-extension directory:
Open the share-config-custom.xml file.
Change any instance of the server and port to the correct name or IP address of the Alfresco server.
http://yourserver:8080
Save the file.
Start the new Share Tomcat instance.