How to Use DBInstanceID from the ROS to query the database urls by Aliyun CLI - alibaba-cloud

I am trying to work with Alibaba Cloud from Command line by use Aliyun CLI & Aliyun ROS CLI.
When creating a stack by ROS template, I got the outputs are DBInstanceStatus and DBInstanceID.
So How to Use DBInstanceID from the ROS to query the database URLs by Aliyun CLI?
One more question Can we do a backup restore the database with Aliyun CLI commands or not? If yes, how to do it?
Thanks,

You can not query the MongoDB connection information by using ROS CLI. You should use MongoDB API:
DescribeReplicaSetRole or DescribeShardingNetworkAddress
The related python sdk is aliyun-python-sdk-dds
pip install aliyun-python-sdk-dds
https://github.com/aliyun/aliyun-openapi-python-sdk/tree/master/aliyun-python-sdk-dds

Related

debug azure webapp using ssh

I am working on a new webapp in azure cloud.
The challenge is that I am working on a new python module that I dont know that well, Pyspice. Pyspice interface to a program Ngpspice.
On my windows PC it works fine but not on the cloud. So I would like to be able to do debugging without pushing and then wait 25min for each build.
Right now I am using SSH to connect to the webapp. Then I can create a simple python script to see if I can get the connection to work between pyspice and ngspice. The challenge I have is that when I run python in SSH then it uses a different environment than the webapp, i.e. all the modules in the requirements.txt is not available. So how can I change environment to be able to debug?
I have created an Azure App service with Python version 3.8, when I check the version in Azure SSH it is showing me different version.
To install the latest version in Azure SSH, run the below command
apt update
apt install python3.9
python --version
Run the below command to change the python version of the Azure App service in Azure Cloud Shell (Bash).
az webapp config set --resource-group MyRGName --name WebAppName --linux-fx-version "PYTHON|3.9"
To check the updated version, run the below command
az webapp config show --resource-group MyRGName --name Python4Nov --query linuxFxVersion
debug azure webapp using ssh
To remote debug Azure Linux App Service, we need to open a TCP Tunnel from the development machine to Azure App Service.
Configure for SSH and Remote Debugging
In Azure CLI run the below command
az webapp create-remote-connection --resource-group MyRG -n WebAppName
References taken from MSDoc

how to install confluent in AWS EC2

I wanted to use confluent in AWS EC2 environment. How can I install it. I have tried the confluent cli in my local and want to replicate this feature of connecting sql to kafka. Is there any documentation on this?
You can find how to install Confluent Platform from DEB or YUM sources in Confluent docs. Otherwise, extract the same package you would have done locally.
There's AWS quickstart templates or Ansible setups on Confluent Github for setting up a full cluster. Or you could use EKS to run it in Kubernetes, if that's something you're comfortable with. I'm sure there's some third party Terraform repos out there as well...
For non-container, production use cases, you'd use systemctl to start services on independently running servers, not all Confluent services on just one system like with confluent start
Sounds like you just want to run KSQL, but it's not clear if/where you have a running Kafka cluster
you just need to download confluent zip from here
https://www.confluent.io/download/
unzip in your desired folder
for start confluent services
go to confluent bin /path to extract folder/confluent/bin
for start all confluent service
confluent start
for check service status
confluent status
for stop service
confluent stop

Using composer-wallet-redis , where to see the card in redis service?

I follow the guideline .
Install composer-wallet-redis image and start the container.
export NODE_CONFIG={"composer":{"wallet":{"type":"#ampretia/composer-wallet-redis","desc":"Uses a local redis instance","options":{}}}}
composer card import admin#test-network.card
I found the card still store in my local machine at path ~/.composer/card/
How can I check whether the card exist in the redis server?
How to import the business network cards into the cloud custom wallet?
The primary issue (which I will correct in the README) is that the module name should the composer-wallet-redis The #ampretia was a temporary repo.
Assuming that redis is started on the default port, you can run the redis CLI like this
docker run -it --link composer-wallet-redis:redis --rm redis redis-cli -h redis -p 6379
You can then issue redis cli commands to look at the data. Though it is not recommended to view the data or modify it. Useful to confirm to yourself it's working. The KEYS * command will display everything but this should only be used in a development context. See the warnings on the redis docs pages.
export NODE_ENVIRONMENT
start the docker container
composer card import
execute docker run *** command followed by KEYS * ,empty list or set.
#Calanais

Cassandra DevCenter fails to recognize "COPY" command

I am trying to run the copy command using DataStax Devcenter. I am using Cassandra 2.0.11 and DevCenter 1.2.1
COPY myks.table1 from "D:/test.csv" WITH DELIMITER = ',';
But Devcenter fails to recognize the COPY command and keeps giving me error. I can create keyspace, tables, insert values. Any ideas will be appreciated. There is another thread, but it also has no answer. here
DevCenter does not support COPY, DESCRIBE, SHOW or SUPPORT commands. Use CQLSH instead.

Installing Mahout on Amazon EC2 instance - get_reference_source command not found

As my school project, I've created a AWS EC2 instance and trying to install different "Dev Tools" and software as per AWS doc [http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html.
][1]
I'm trying to get mahout tarball using get_reference_source -p mahout while connecting to AWS instance via putty.
But this command gives error "get_reference_source " command not found. I'm searching for it since morning and found nothing.

Resources