Where is my Google App Engine datastore local file, when developing in Eclipse? - eclipse

I am developing a Google App Engine project in Java, using Google Cloud Tools in Eclipse. I added a Maven dependency to my project for using the App Engine Datastore. I run code that both writes to the datastore and reads back from it.
When I browse to the local admin console at localhost:8080/_ah/admin, there is no data to view. And from what I've read, there should be a local datastore file in my project's /WEB-INF/appengine-generated directory. But that directory never gets created, and obviously neither does the file.
Is there somewhere within my project's properties that define where that file is being created? And is there any reason the admin console is not seeing the data wrote to the datastore?

Cloud Tools for Eclipse supports running multiple Development App Servers, including having the same App Engine service running in each. So we can't use the source directory for deployment as the different instances will interfere.
Instead each instance of your service is copied into a deployment area found in <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp<X>/<service-name>. We should do better to expose that location.
When you first interact with the Def App Server's Datastore emulator, you should see some messages to the console identifying the location of the datastore files.
Nov 29, 2018 12:25:38 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: High Replication
Storage: /Users/bsd/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/test-imageservice-3079/WEB-INF/appengine-generated/local_db.bin
Nov 29, 2018 12:25:38 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: The backing store, /Users/bsd/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/test-imageservice-3079/WEB-INF/appengine-generated/local_db.bin, does not exist. It will be created.
Nov 29, 2018 12:26:08 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 8 ms
You can also tell the Development App Server by editing the server launch configuration and adding --generated_dir command-line argument like the following:

Related

How to deploy EAR into the WAS cluster and IBM HTTP server by Monitored Directory Deployment functionality

My goal is to automatically deploy EAR file in WebSphere Application server cluster by Monitored Directory Deployment. So my deployment target is cluster. WAS version is 9.0.0.10. Everything works fine if I drop EAR file in
monitored directory for example '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/'. Application is deployed and started. But I also want to deploy that application into the IBM HTTP server(resides in the same WebSphere cell with cluster) in the same automatically process by Monitored Directory Deployment.
I tried to manually predefine deploymentTargets(cluster and ibm http server) in deployment.xml file, put it in the EAR file, and drop EAR in the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/', but WAS deploy EAR only in cluster. As a consequence I must manually via WAS console map all modules from EAR to ibm http server, but I do not want to do it manually.
My second idea/attempt was sto create separate monitored directory for the ibm http server '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'.
First I drop EAR into the '/{monitored_directory_defined_in_WAS}/clusters/my_cluster_name/' and right after that I drop EAR in to the '/{monitored_directory_defined_in_WAS}/servers/my_ibm_http_server_name/'. Result is that the EAR modules are deployed only in to the web server, and that is not my goal.
Is that even possible by WAS Monitored Deployment Directory functionality?
Is it allowed to manually create the deployment.xml file and add it to the EAR file?
First of all installing via monitored director is not recommended in the production environments, as it lacks control.
As you correctly suspected it is not possible to install it to the cluster and web server - check Installing enterprise application files by adding them to a monitored directory.
Because you can use only one server directory, drag and drop to map
applications to combinations of servers is limited. Scenarios
requiring use of more than one server, such as mapping to an
application server and a web server, are not supported by direct drag
and drop of an application file.
However, you still want to use it, you may deploy property file into monitored directory. That property file can fully customize your deployment e.g. configuring also module to map to web server.
Check Installing enterprise application files by adding properties files to a monitored directory for more details
UPDATE
If you have issues, I'd suggest the following approach - install your application 'classically' via admin console and map it to both web server and cluster. Then run wsadmin command to extract propertes:
AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Deployment=MyApplication -options [[SimpleOutputFormat true]]]')
Try to use format from that exported file for your properties
I had time to run it in my environment. I have app with 2 modules inside, one module is just mapped to the cluster, other is mapped to both cluster and web server. Here is relevant part of the property file:
taskName=MapModulesToServers
row1={ module=HelloTestUI #readonly
uri=HelloTestUI.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName} }
row0={ module=HelloTestWeb #readonly
uri=HelloTestWeb.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},cluster=!{clusterName}+WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
I didnt try to use that property file to deploy the app via monitored directory, but as you can see the entry is created and mapping is done via + sign that connects cluster and web server.
If you dont see the mapping to your web server, make sure you saved the changes done in the console, and then connected via wsadmin, otherwise wsadmin will have not current data.

Running Strapi in production and version control sync issues

I'm wondering what the best practice is for running Strapi in production. I noticed that Strapi generates new files when a content type is added. This means that the production environment's files will become out of sync with version control. Is there a recommended deployment process? Am I supposed to commit changes from production to my git repo after making changes in the admin?
The file generation which is made primarily by content-type-builder and other settings are disabled in production mode NODE_ENV=production
The admin panel is supposed to be already built on prod, so you only add necessary data into DB based on the given data structure.
TLTR:
Summarizing answer to your question in from github.com/strapi/strapi/issues/1986:
emadicio commented on 20 Sep 2018
If you run your app with NODE_ENV=production you'll notice that plugins that actually edit or create files are disabled. So that means you cannot create or edit content types in prod
Downloaddave commented on 22 Sep 2018:
I had deployed Strapi locally then to a Prod environment, and was confused since I didn't see the content-type-builder in the production CMS.
I'm trying to understand the deployment and update process as well...
Developer sets Strapi up locally
Creates content-types using the content-type-builder
Strapi makes updates to the file structure locally and on the local MongoDB
On production we will have to push both the code and db updates?
I understand that making changes to the content-type-builder reboots the service, and we don't want production to go down during the rebuild, but it seems like data would get really out of sync between production and development.
Aurelsicoko commented on 2 Oct 2018
You're right! The Content-Type Builder is a development plugin. His goal is to speed up the development of your project. It should not be used in production. We didn't design this plugin like for this usage.
The real pain is to migrate the development configuration to production, and vice-versa. We plan to offer a new command with the CLI called strapi migrate to easily migrate from an environment to another. I can't give you a release date though...
Any news on this strapi migrate command? It is a major thing for me and my team in order to do go on with Continuous Integration and delivery.
I hope it is not going to be same like with Wordpress that still has no native solution to solve the migrations between Prod and Stage...
Appreciate the answer. Greetings

What are the best practices to migrate to Bluemix?

I am looking for some documents/guides on how to migrate from other PaaS systems/legacy on premise to Bluemix - best practices, requirements, etc.
Anything at all would help, thanks, Jason.
Your question is quite generic, however here are some links regarding the migration from the main technologies:
From JEE: http://www.slideshare.net/davidcurrie/aai-2698migratingtobluemix
From LAMP: http://www.ibm.com/developerworks/library/wa-migrate-lamp-app-to-bluemix-trs/index.html
From other PaaS: http://www.slideshare.net/kelapure/2259-migrate-herokuopenshift-applicationstobluemixpublic
Finally, please note that moving from an on-premise solution to a Cloud Foundry-based one requires some considerations regarding the local file system:
Local file system storage is short-lived. When an application instance crashes or stops, the resources assigned to that instance are reclaimed by the platform including any local disk changes made since the app started. When the instance is restarted, the application will start with a new disk image. Although your application can write local files while it is running, the files will disappear after the application restarts.
Instances of the same application do not share a local file system. Each application instance runs in its own isolated container. Thus if your application needs the data in the files to persist across application restarts, or the data needs to be shared across all running instances of the application, the local file system should not be used.
For this reason local file system should not be used.
If you want more information on this topic please take a look at Considerations for Designing and Running an Application in the Cloud
If you're talking about a java app, see the post below:
Can I run my Tomcat app on Bluemix?
If you're moving an existing Websphere app, then this will help:
How do I move my existing WebSphere application to Liberty on Bluemix?
Jason - start here:
https://www.ng.bluemix.net/docs/
Then you can watch the YouTube videos:
https://www.youtube.com/channel/UCwYdW8mfXZwJQvB65789_vQ
After that, take a peak at developerWorks:
http://www.ibm.com/developerworks/devops/plan.html
Let me know if that helps.
Migrate an app from Heroku to Bluemix:
http://www.ibm.com/developerworks/cloud/library/cl-bluemix-heroku-migrate-app/

Deployer user does not have Access to the file

I Try to deploy a application using Microsoft Release Management for Visual Studio or better known as "InRelease". But i face unexpected Problems using the MSI-Deployer.
The deployment fails with the flowing error:
Setup.msi XXX139W8 10/1/2014 11:19:18 AM 00:00:00 Package location '\\Server\drop\Application\Build_20140930.5\Setup.msi' does not exist or Deployer user does not have access. Failed
First suggestion(incorrect Path) is not the case, i double checked that.
So why does my Deployer user not have access to my server? And how to fix that?
I tried out running the DeploymentAgent as Administrator, as Local Service adding XXX139W8$ permissions to the drop folder, running as domain user with admin rights on the drop folder.
Sadly the deployment agent is totally unreachable or the error mentioned above shows up.
Here are some system specs:
TFS and RM Server run on a Windows Server 2012 R2 with SQL Server Express 2012 Installed.
The client i am Working on uses the Release Management Client for Microsoft Visual Studio 2013
The Target Machine is a Windows 8.1.
The deployer user is defined in the MS Deployment Service, ensure that this account has access to your Drop folder. I give the domain\EVERYONE account read access to the drop folder so that anyone can read the data
I resolved this Problem.
The cause was that i specified a File as Package (quite confusing if you try to deploy a single msi file) but the Component should only specify a Folder "Package".
The deployment agent fails to access the Folder (Setup.msi) and fails with the error i showed above.
Then i wasted hours in trying to fix my access problem, because if i enter the "Package location" everything worked fine._.

Running multiple instances and logging into one file at a time

I am using enterprise library 4.0 application logging block.
My project is a web services and running under IIS 7.0 and configured as RollingFlatFileTraceListenerData.
The issue is due to more hits the web application creates multiple *.log files with names like some GUIDs.
Is there any configurations to set all instances to log into one file at a time and roll over based on rollInterval and rollSizeKB.