In AWS we have SSM which help us to connect to Cluster Instances and using SSM we got the data about the container in Java.
Same I am looking for Azure too. I want to connect with Azure Cluster Instances.
Is there any service in Azure available to get it done ?
In Azure i find out we can achieve this goal using Azure VM.
https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/run-command
Related
I need to set up HBase remotely and since, I have a trial 12 months AWS account, I chose to do it in AWS.
This document https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-hbase-create.html describes the initial steps but it's not enough.
Could you explain me how to set up HBase in AWS properly in order to connect to it with my Java application? (how to expose port, enable inbound/outbound traffic, etc.)
Context
I have a java application built as a docker image.
The image is deployed in a k8s cluster.
In the java application, I want to connect to the api server and save something in Secrets.
How can I do that with k8s java client?
Current Attempts
The k8s official document says:
From within a pod the recommended ways to connect to API are:
run kubectl proxy in a sidecar container in the pod, or as a background process within the container. This proxies the Kubernetes API to the localhost interface of the pod, so that other processes in any container of the pod can access it.
use the Go client library, and create a client using the rest.InClusterConfig() and kubernetes.NewForConfig() functions. They handle locating and authenticating to the apiserver.
But I can't find similar functions neither similar examples in java client.
With the assumption that your Pod has a serviceAccount automounted -- which is the default unless you have specified otherwise -- the ClientBuilder.cluster() method reads the API URL from the environment, reads the cluster CA from the well known location, and similarly the ServiceAccount token from that same location.
Then, while not exactly "create a Secret," this PatchExample performs a mutation operation which one could generalize into "create or update a Secret."
I have a Ubuntu VM in an EC2 AWS instance, with MongoDB installed. I can successfully save information to this database on my local machine using a spring boot application. However, this remote connection can only be made when I have a connection to remote Mongodb open on my local machine. Otherwise, the connection is refused.
My end goal is to have a mobile application that can preform CURD operations to a remote MongoDB.
Any help regarding this issue is appreciated.
Thanks.
You shouldn't be trying to connect to a remote MongoDB from a mobile application because anyone will be able to tamper with the information you are storing in it.
Consider using a local database bundled along with your mobile application or connecting from your mobile application to your Spring boot app which can then talk to the MongoDB instance.
Please check some point.
1: Please check remote connection open in your Mongo instance
2: Ec2 Instance have public accessibility
3: Ec2 Instance mongo port enabled and remotely accessible.
Did you confirm that the bind_ip actually changed to 0.0.0.0/0, ::/0
We are trying to access de ElasticCache (Redis) on aws using a Java client that runs locally using Jedis lib. We were able to access the redis using redis-cli locally following the steps here.
The problem is that when we try to connect to aws Redis using Jedis lib, the NAT public address are being translated to the redis private IPs in order to calculate the slots (initializeSlotsCache). We couldn't find a way to disable this. Are there any workaround?
Here's how we connect using Jedis:
factory = new JedisConnectionFactory(new RedisClusterConfiguration(this.clusterProperties.getNodes()));
factory.setUsePool(true);
factory.setPoolConfig(this.jedisPoolConfig());
factory.afterPropertiesSet();
return factory;
We are using the mapped NAT ips for each node. But the Jedis lib is saving the private ips in the cache, so we get the following exception:
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
Any suggestions would be great! We are running out of options. Thank you in advance.
You cannot connect to AWS hosted redis from outside the AWS environment.
We had faced a similar issue, and the work around we had was to install a local redis instance for dev and unit testing.
I have installed Cassandra on Microsoft azure instance from http://www.planetcassandra.org/cassandra/ and trying to access remotely from java client.I have enabled endpoints for port no 9042 but could not access it remotely. After googling I have modified listen_address to local IP of azure instance ,rpc_address to public IP and broadcast_rpc_address to 255.255.255.255 in cassandra.yaml file but still I could not access the instance form my java client.
Please try to refer to the article Running Cassandra with Linux on Azure and Accessing it from Node.js to set your Cassandra using PowerShell. It's for Linux instance, but I think it's helpful for you. And the comment at the bottom of the article, a blog shows more details as reference.
Meanwhile, the simple way to install cassandra is create a Datastax Enterprise instance from Azure Marketplace, please see https://ms.portal.azure.com/?feature.relex=*%2CHubsExtension#blade/Microsoft_Azure_Marketplace/GalleryFeaturedMenuItemBlade/selectedMenuItemId/home/searchQuery/cassandra. Then, you don't need to consider for installing on Azure, please see the tutorial for getting started with Datastax Enterprise.
Hope it helps.