I want to configure a test environment for integration of prebid mobile SDK. So I deployed the prebid server with Docker, as described here:
https://github.com/prebid/prebid-server/blob/master/docs/developers/deployment.md
and implemented a test application for iOS as described here:
http://prebid.org/prebid-mobile/pbm-api/ios/code-integration-ios.html
But I can't find how to configure the prebid server to start working with SDK, f.e.:
how to register an account and get Account ID
how to add ad units
configs
Any ideas about how it could be performed?
Related
I'm working with a startup to build an app. I've been studying CS for 2 years, so I'm new to lots of things. For our app we have a ReactJS front-end, Express back-end, and MySQL database. Currently it's deployed on AWS Elastic Beanstalk in a NodeJS environment. I configured it to run react-scripts build after it's been deployed. It's serving the static React-generated files through the Express server (bad idea, I know). This has worked for a while, but now the instance is running out of memory when trying to build.
I've been looking into Docker as a better solution (I've never used Docker before this week), and now I have a local development setup with 3 containers: a MySQL container, a Node container running the backend, and an Alpine container just running react-scripts start. The front-end is using a proxy to connect to the backend. This is all working fine locally (except that my backend container can't connect to the Internet so an external API is broken), but I have no idea how to deploy this correctly to AWS.
With Elastic Beanstalk is there a way for me to build and deploy a single Docker container with the pre-built React front-end, configure Nginx to serve those static files, and then pass all /api requests to the Express server? I'm using RDS for the database, so I don't feel like I need to deploy another container for MySQL.
I don't expect you guys to solve my problem, but I'd appreciate being pointed in the right direction. Maybe I'm going about this completely the wrong way.
React App:
I suggest you deploy your react application on AWS Amplify. you can find resources on how to deploy on the internet very easily.
MySQL
You can host your MySQL database on an EC2 instance or use any other hosted service for the database.
Express App
Now you can host your express app on EBS using the docker platform. You can also get the resources for this on the internet.
===========================================================================
Now add your express app endpoint in AWS Amplify's environment to use it with react app.
Add MySQL URL to EBS's environment to use it with Express App.
Note: AWS amplify serves your app on HTTPS so you have to enable SSL on EBS also. You can do it with the AWS certificate manager by
getting an SSL certificate and attaching it to the EBS.
It will be easy if the domain is handled by Route53 but again you can also achieve this with any domain service provider.
It is recommended that you should migrate your domain to Route 53, as you will get more control and also many other benefits.
Refer this answer: https://stackoverflow.com/a/38225802/9323655
Hope my answer will guide you in the right direction.
Azure web app Easy auth (with Azure AD auth) is working for windows web apps, but not on Linux web app.
After enabling the easy auth with Azure AD the web app url shows page not found.
When I checked the web app logs, the container has started and ready to serve the requests. But the web app still shows same Not Found error.
If I disable the easy-auth the web app is working as is.
My azure web app tech stack is
React SPA running on Node LTS 14 in a Linux web app.
Not sure if I am missing something on configuration. Any help is appreciated.
Thanks in advance...
Please check if below cases :
Note :
Limitation : App Service on Linux is not supported on Shared pricing tier.
Linux Azure Web Apps uses pm2 to serve a node app
Go to Azure app service> Configuration > General Settings.
If your build folder is at the root of the project,give Start up command: pm2 serve /home/site/wwwroot --no-daemon –spa
Please go through these related issue References to trouble shoot :
reactjs - Web App Linux - Stack Overflow
React App not starting in azure app service - Stack Overflow
Also please check this Blog.
According to Azure App Service | Microsoft Docs
This error could be due to one of several reasons:
The custom domain configured is missing an A record or a CNAME
record.
The web app owner has moved the web app to a different region, but
the DNS cache is still directing to the old IP Address that was used
in the previous region.
Clear the browser cache and cookies for the site and test for DNS
resolution/ dns entries if they are still pointing to an old IP.Edit
and correct dns in that case.
In your app page, select TLS/SSL settings. Then make HTTPS Only to On.
Also, suggest you Enable diagnostics logging for web apps in Azure App Service incase if you haven’t enabled earlier to check the complete error details and root cause.
We are planning the migration of an internal app running on Google App Engine Standard Environment for Java 8 from the now superseded App Engine APIs to the recommended client library for Cloud Firestore in Datastore Mode, also in order to enable porting to other execution environments.
Besides a host of issues with missing IN/OR query operators, we are also struggling with the setup for local testing: according to Using the Java 8 Local Development Server
The development web server simulates Datastore using a local
file-backed Datastore on your computer. The Datastore is named
local_db.bin, and it is created in your application's WAR directory,
in the WEB-INF /appengine-generated/ directory.
but we have no clue about how to connect Google Cloud Client Library for Datastore to the local emulator.
Defining default credentials with
gcloud auth application-default login
or setting the GOOGLE_APPLICATION_CREDENTIALS environment variable after obtaining the credentials for the service account with something like
gcloud iam service-accounts keys create key.json \
--iam-account=project-id#appspot.gserviceaccount.com
as suggested elsewhere, just results in the client library connecting to the actual cloud server, rather than to the local emulator, as per the ADC policy.
I'd expect the development server to automatically provide connection hints to the client library, but that's apparently not the case.
Any suggestion for setting up a local testing environment, taking into account that we can't just migrate to the standalone Datastore Emulator, as we need other services currently provided only by the App Engine development server (e.g. email submission)?
Edit / After further tinkering we are working around the issue by using both the Local Development Server and the standalone Datastore Emulator as:
gcloud beta emulators datastore start \
—project=project-id \
--host-port=localhost:8081 \
--data-dir=target/war
DATASTORE_EMULATOR_HOST=localhost:8081 java_dev_appserver.sh \
--port=8080 \
target/war
However, the process is quite cumbersome and difficult to automate: what we are looking for is a way to automatically connect Google Client Library to the Datastore Emulator managed by the Java 8 Local Development Server when launching the app with something like the App Engine Maven plugin, e.g. mvn appengine:run.
This GitHub issue was closed with the confirmation that the Datastore Client Library is not compatible with the local Web Server Datastore Emulator.
I actually tried it, to see if was possible to force a connection to the local Web Server. The code below sets a custom builder with the desired host configuration:
DatastoreOptions.Builder builder = DatastoreOptions.newBuilder();
builder.setHost("http://localhost:8080");
builder.setProjectId("<PROJECT_ID>");
Datastore ds = builder.build().getService();
Key key = ds.newKeyFactory().setKind("MyEntity").newKey("mykey");
Entity entity = Entity.newBuilder(key).set("p1", "Hello World!").build();
entity = ds.put(entity);
System.out.println(entity);
entity = ds.get(key);
System.out.println(entity);
After running the local Web Server I noticed a connection was indeed possible, however the Datastore Client Library returned the following error when trying to store new entities:
[INFO] GCLOUD: com.google.cloud.datastore.DatastoreException: Non-protobuf error: <html><head><title>Error 404</title></head>|<body><h2>Error 404</h2></body>|</html>. HTTP status code was 404.
With the following output by the Web Server:
Oct 02, 2019 3:05:59 PM com.google.appengine.tools.development.jetty9.LocalResourceFileServlet doGet
WARNING: No file found for: /v1/projects/<PROJECT_ID>:commit
I believe this adds to the confirmation that the new library is just not compatible to the old emulator.
The workaround you found is probably the best solution while you work/wait on the full migration to the Datastore mode Emulator.
I am creating a GAE application, and I am following the proposed structure of modularized GAE applications in Eclipse with WTP, as documented here (see section "Enterprise Application EAR").
I have created and linked a local server instance of GAE, and the deployment of the EAR with its modules to the GAE development instance at localhost works fine.
However, when I try to "Deploy to App Engine" (via the Google button) in order to release my app to the Google remote server, I am stuck with the error "...(EAR project name) is not an App Engine project". I have also tried to define a new server with a remote address, but this fails with the error "The currently selected server type does not support remote hosts". The host name's field is restricted to "localhost" as a valid server address.
My Eclipse project structure looks as follows:
<<Enterprise Application Project>> ear-app
|
-- <<Dynamic Web Project>> app-module-1
-- <<Dynamic Web Project>> app-module-2
-- <<Dynamic Web Project>> app-module-3
-- <<Dynamic Web Project>> app-module-4
Please note that this is not a single "Google / Web Application Project", which works as expected (but does not support modularization with multiple Eclipse projects).
Please also note that I am not using Maven and the proposed mvn commands, as documented here.
I am using the GAE SDK 1.9.3 and GPE 3.5.1 in Eclipse Kepler 4.3.1.
So how do I deploy the Eclipse WTP project structure to Google remote servers? If this is not possible, do you suggest that I switch to Maven, and if so, does this support a multi-module project to be managed from within Eclipse?
Rather by chance, I stumbled across the solution:
In the Servers view, and upon right-click of the local development server, there is another context menu entry "Google App Engine WTP / Deploy to Remote Server". This will deploy the EAR and all modules to the Google infrastructure. There is also a "Google App Engine WTP" button in the Servers view's menu, offering the same options.
Frankly, I find this a highly inconsistent UI implementation: If we create a project of type Google Web Application, then the Google button in the main menu is effective, and the context menus can be found as "Google...". These become invalid (but are still present) when we create a multi-module EAR structure in the WTP style. This will create a different set of buttons and context menu entries, all in different places, and the context menu of the LOCAL server would then support deployment to the REMOTE server.
UPDATE:
After using the GAE tools for a couple of weeks, I finally switched to the command line options (appcfg) for remote deployments. I had additional errors in GPE for deployment rollbacks (which fail in Eclipse but work with appcfg). I recommend appcfg as administration tool for the Google infrastructure, it provides more control and it is more mature than the Eclipse plugin.
I am working on an web+mobile app that uses App Engine (Java), and uses the Android Accounts API for automatic authentication, using code such as:
AccountManager manager = AccountManager.get(activity);
Account[] accounts = manager.getAccountsByType("com.google");
I want to be able to develop offline - using the android emulator and the appengine dev server. How can I set up an account such as xyz#example.com (or xyz#google.com) on my emulator to be able to use it with localhost:8888/ urls?
Thanks
When inside the emulator the hosts localhost interface (the one your dev server is listening to) can be reached with the ip address 10.0.2.2. I think the dev server accepts any google account.