I am currently adding the subnet to cosmos db through this cli using the below script. Its working fine.
az cosmosdb network-rule add --subnet subnetid --ignore-missing-endpoint true --name dbName --resource-group rg_Group --subscription sub_id --virtual-network vnet_name
but now, I need to add couple more subnet from different Vnet to the same cosmos db, I can add another line to do. But, I am wondering is there a way I can pass just the resource ID's of the subnet like space delimeted. I can see from the link that there is --ids as optional parameter but resource Id's of cosmos.
We have tested the cmdlets in our local environment, below statements are based on our analysis.
az cosmosdb network-rule add I need to add couple more subnet from different Vnet to the same cosmos db, I can add another line to do.
But, I am wondering is there a way I can pass just the resource ID's
of the subnet like space delimeted. I can see from the link that there
is --ids as optional parameter but resource Id's of cosmos.
Using --ids flags in the above cmdlet you cannot add multiple subnets/multiple virtual networks in virtual network rule of cosmos db.
if you want to add the same subnet as network rule to multiple cosmos database accounts you can pass those cosmos DB account resourceID using the --ids flags in the above cmdlet as shown below.
az cosmosdb network-rule add --ignore-missing-endpoint true --subnet <subnetResourceID> --ids <ResourceIDCosmosDb1> <ResourceIDCosmosDb2>
Here is the sample output for reference:
As suggested in this GitHub link, you can use below cmdlet to add multiple subnets to a cosmos db
az cosmosdb update --resource-group <rgname> --virtual-network-rules <list of subsnets> --ids <cosmosdbResourceID>
Here is the reference documentation for az cosmosdb update cmdlet
Related
In order to use multi-storage in Scalar DB, I am implementing it with MySQL and Dynamo DB Local, but the Endpoint Override setting for Dynamo DB Local does not work.
I have configured the following settings, but are they correct?
## Dynamo DB for the transaction tables
scalar.db.multi_storage.storages.dynamo.storage=dynamo
scalar.db.multi_storage.storages.dynamo.contact_points=ap-northeast-1
scalar.db.multi_storage.storages.dynamo.username=fakeMyKeyId
scalar.db.multi_storage.storages.dynamo.password=fakeMyKeyId
scalar.db.multi_storage.storages.dynamo.contact_port=8000
scalar.db.multi_storage.storages.dynamo.endpoint-override=http://localhost:8000
The format of the storage definition in Multi-storage configuration is as follows:
scalar.db.multi_storage.storages.<storage name>.<property name without the prefix 'scalar.db.'>"
For example, if you want to specify the scalar.db.contact_points property for the cassandra storage, you can specify scalar.db.multi_storage.storages.cassandra.contact_points.
In your case, the storage name is dynamo, and you want to specify the scalar.db.dymano.endpoint-override property, so you need to specify scalar.db.multi_storage.storages.dynamo.dynamo.endpoint-override as follows:
scalar.db.multi_storage.storages.dynamo.dynamo.endpoint-override=http://localhost:8000
Please see the following document for the details:
https://github.com/scalar-labs/scalardb/blob/master/docs/multi-storage-transactions.md
Is it possible to scope Openstack CLI output for listing networks only for a single project. I have tried multiple options like --os-project-id, --os-project-name etc but it seems to list down all networks across multiple projects/tenants.
Currently, the command I am using is:
openstack network list --os-username XXX --os-password YYY --os-project-id ZZZ
Note: The credentials that I am using here are of an 'admin' account
Parameters set in the environment are :
OS_PROJECT_ID=XXX
OS_REGION_NAME=XXX
OS_TENANT_ID=XXX
OS_USER_DOMAIN_NAME=XXX
OS_PROJECT_NAME=XXX
OS_AUTH_VERSION=XXX
OS_IDENTITY_API_VERSION=XXX
OS_PASSWORD=XXX
OS_AUTH_URL=XXX
OS_USERNAME=XXX
OS_TENANT_NAME=XXX
OS_INTERFACE=XXX
OS_PROJECT_DOMAIN_NAME=XXX
May be your networks are shared by all tenants. If you only have a few networks you can verify with neutron net-show Network-Name and review the shared attribute
BTW I use the env variable OS_PROJECT_NAME to switch between projects
Without any explicit filter specified in the parameters, Neutron's network API returns all networks that the user accessing the API has privileges to list. The recommended way to scope down the list of networks to a specific project is to explicitly specify that filter.
Via CLI, you can scope the list to a specific project "demo" using the following example:
openstack network list --project demo
You can see more filtering options via the help text:
openstack help network list
Issues were caused by an older version of Openstack CLI v3.7.0
Using Openstack CLI version v3.13.0, I was able to solve my requirement. By default, with the domain admin account, the CLI still dumped the entire network list but with the --long flag, the 'project' field this time was populated and I could filter out the results for the specific project.
This was not the case with the previous CLI versions. Usage of '--long' flag had all the values of 'Project' as none.
I've been trying to provision a 2-node-type service fabric cluster using ARM. The secondary node type (backend) should not be exposed to the internet. For that I've created a loadbalancer with an internal IP-Address.
Everything gets provisioned correctly but I cannot get the nodes added to the cluster. From the Azure portal when I open the cluster it says it has no nodes in it even though it has the node types configured.
I have even tried downloading the template produced by the azure portal after creating a service fabric cluster. I have also executed one of the templates provided on github and I cannot still see any nodes in the cluster.
Any suggestion what I could be missing?
Thanks
Glad to hear you got that sorted. Regarding your follow-up question on deploying to the backend node-types, that's where you'd use placement constraints. When you create clusters in Azure through ARM, it automatically sets up a placement property on each node using the node type name you defined. So on your back-end nodes, assuming your node type is called "backendnode" you'll have the following placement policy defined:
NodeTypeName: backendnode
When you deploy your services, just use that as your placement constraint:
New-ServiceFabricService -ApplicationName "fabric:/myapp" -ServiceName "fabric:/myapp/myservice" -ServiceTypeName "myservicetype" -Stateful -MinReplicaSetSize 2 -TargetReplicaSetSize 3 -PartitionSchemeSingleton -PlacementConstraint "NodeTypeName == backendnode"
I am using .NET SDK for AWS and and trying to create a service that can create/mange instances. As part of this I want to create an EC2 instance in a specific VPC (non-default). There may have more then one VPC in a zone and I want to programatically be able to create/manage instances in any of the VPC rather than just the default VPC.
Is this possible? If yes how? I looked through the API docs and could not find a way to specify the VPC at the time of creation of EC2 isntance.
The VPC appears to be implied by the subnet-id that you specify. If this doesn't get you there, it might at least get you an error message explaining what you've missed.
http://docs.aws.amazon.com/sdkfornet/latest/apidocs/items/PEC2Instance_SubnetId_NET4_5.html
http://docs.aws.amazon.com/sdkfornet/latest/apidocs/items/TEC2RunInstancesRequest_NET4_5.html
http://docs.aws.amazon.com/AWSSdkDocsNET/latest/DeveloperGuide/run-instance.html
From the underlying REST API:
SubnetId
[EC2-VPC] The ID of the subnet to launch the instance into.
Type: String
Default: None
Required: No
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html
How to create data base link in oracle 11 g to Access Tables.
You seem to have copied the example in the documentation without really understanding it.
The USING 'local' part of the statement is creating a link to 'the local database', where local is the service name of a database. (The example is a bit confusing, to be fair).
When the link is used it tries to interpret local as a service name, appending the current database's domain, as the docs say:
USING 'connect string'
Specify the service name of a remote database. If you specify only the
database name, then Oracle Database implicitly appends the database
domain to the connect string to create a complete service name.
Therefore, if the database domain of the remote database is different
from that of the current database, then you must specify the complete
service name.
If you're trying to create a link back into the same database - which would be a bit odd but I've seen it done in place of grant access across schemas, and that seems to be what the example is hinting at - then you can replace 'local' in the USING clause with the service name of your current database (e.g. USING 'orcl', or whatever).
You can also use a TNS alias; if your tnsnames.ora has an entry for SOME_DB which points to the SID or service name of another database, you can have USING'some_db'`. You should be able to use any connect string I think; certainly Easy Connect is allowed. There's more in the net services admin guide.