nsg | Navigating Spreading-out Graph For Approximate Nearest | Search Engine library
kandi X-RAY | nsg Summary
kandi X-RAY | nsg Summary
NSG is a graph-based approximate nearest neighbor search (ANNS) algorithm. It provides a flexible and efficient solution for the metric-free large-scale ANNS on dense real vectors. It implements the algorithm of our PVLDB paper - [Fast Approximate Nearest Neighbor Search With The Navigating Spread-out Graphs] NSG has been intergrated into the search engine of Taobao (Alibaba Group) for billion scale ANNS in E-commerce scenario.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nsg
nsg Key Features
nsg Examples and Code Snippets
Community Discussions
Trending Discussions on nsg
QUESTION
I'm tryig to find unassociate public IP in my Azure subscription with Azure resource graph explorer. I was able to find for a NSG but I can't do the same thing with public IP. Is somebody has an idea about the Query that I can use ?
Thanks,
...ANSWER
Answered 2022-Mar-18 at 13:06I tend to use that snippet. It is really worth learning KustoQL, as it is extremly useful to find resources or log entries.
QUESTION
I am trying to follow the solution given here How I can avoid multiple loops with Terraform for_each and dynamic for resource azurerm_network_security_group?
Here is my module: Module-Azure-Nsg-V3/main.tf
...ANSWER
Answered 2022-Mar-08 at 03:47destination_address_prefix
is actually "destination_address_prefix "
- you have extra space in your csv file after destination_address_prefix
.
QUESTION
I tried multiple powershell script to do azure VM backup and restore but none of them are seems working or not so effective. Could any one please share the powershell script to create backup of VM and restore in azure via azure devops pipeline.
PowerShell Script:
...ANSWER
Answered 2022-Jan-31 at 12:19param (
[Parameter(Mandatory=$false)][String]$ResourceGroupName,
[Parameter(Mandatory=$false)][String]$ServicePrincipalName,
[Parameter(Mandatory=$false)][String]$ServicePrincipalPass,
[Parameter(Mandatory=$false)][String]$SubscriptionId,
[Parameter(Mandatory=$false)][String]$TenantId,
[Parameter(Mandatory=$false)][String]$VMname,
[Parameter(Mandatory=$false)][String]$vaultname
)
$targetVault = Get-AzRecoveryServicesVault -ResourceGroupName $ResourceGroupName -Name $vaultname
$targetVault.ID
Get-AzRecoveryServicesBackupProtectionPolicy -WorkloadType "AzureVM" -VaultId $targetVault.ID
Get-AzRecoveryServicesVault -Name $vaultname | Set-AzRecoveryServicesVaultContext
$policy = Get-AzRecoveryServicesBackupProtectionPolicy -Name $policyname
Enable-AzRecoveryServicesBackupProtection -ResourceGroupName $ResourceGroupName -Name $VMname -Policy $policy
$backupcontainer = Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -FriendlyName $VMname
$item = Get-AzRecoveryServicesBackupItem -Container $backupcontainer -WorkloadType "AzureVM"
$backupjob=Backup-AzRecoveryServicesBackupItem -Item $item
echo $backupjob
#$Backupstatus=Get-AzRecoveryservicesBackupJob
#Wait-AzRecoveryServicesBackupJob -Job $joblist[0] -Timeout 43200 -VaultId $targetVault.ID
Get-AzRecoveryservicesBackupJob
$namedContainer = Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -Status "Registered" -FriendlyName $VMname -VaultId $targetVault.ID
$backupitem = Get-AzRecoveryServicesBackupItem -Container $namedContainer -WorkloadType "AzureVM" -VaultId $targetVault.ID
echo "Please wait for backup to complete - Backup is in progress"
start-sleep -s 30
$joblist = Get-AzRecoveryservicesBackupJob –Status "InProgress" -VaultId $targetVault.ID
$joblist[0]
while (!$rp.ContainerName)
{
$startDate = (Get-Date).AddDays(-7)
$endDate = Get-Date
$rp = Get-AzRecoveryServicesBackupRecoveryPoint -Item $backupitem -StartDate $startdate.ToUniversalTime() -EndDate $enddate.ToUniversalTime() -VaultId $targetVault.ID
start-sleep -s 30
$rp[0]
Write-Host -NoNewline "Waiting 30 seconds for" $VMName "VM to backup"
}
Get-AzRecoveryservicesBackupJob
echo "Backup is completed successfully"
QUESTION
I'm trying to deploy infrastructure using Terraform.
My intention is to deploy a VM with a WinRM listener and for this reason, I need to use a certificate.
I first deploy a Key vault in which I put the certificate and then I retrieve the certificate from the Vault to register it into the Virtual Machine.
...ANSWER
Answered 2021-Dec-31 at 14:45You need to switch to true
the following optional params (in your key-vault resource) :
- enabled_for_deployment - (Optional) Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. Defaults to false.
found here : https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault#argument-reference
QUESTION
We have two VMs behind a Load Balancer. We would like to make one of the VMs publicly inaccessible when we do a new deployment, so we can test the new version of the application before it becomes publicly accessible. The current plan is to block one out of two VMs by changing Network Security Group rule via Service Tag for Load Balancer:
It works. When we change NSG Rule for VM1 from Allow to Deny only VM2 stays publicly accessible. Once we verify that new release works as expected we then switch NSG rule for VM2 and switch NSG rule for VM1, so only a VM with the newest version of application is accessible while we update application on the other VM.
The problem with that is NSG rules don't immediately take effect and can take 1-3 minutes to make VM inaccessible/accessible. More over if we switch NSG for both VMs at the same time we can be in situations when both VMs with different version of software are publicly available which can lead to data corruption or data lose or both VM are not accessible. So the only way around this is to change NSG rule for VM2 then for VM1 and having downtime of 2-6 minutes. Is there a better way to do that?
...ANSWER
Answered 2021-Dec-29 at 11:04Blocking ports 80 and 443 with Windows Defender Firewall via PowerShell Remoting brought the downtime to 40 seconds total.
QUESTION
In order to simplify variable definition, I'm grouping subnets and attributes (like security groups) into a list of dictionaries... which then has a layer of dicts etc.. (or maps/objects)
Here is a sample definition JSON:
...ANSWER
Answered 2021-Dec-26 at 20:28Terraform for_each
accepts only set of strings or map of strings. Passing a var
of something like a list simply wont work. What I suggest doing is the following:
QUESTION
I need feedback. I have the below partial tf code. I am getting "Error: Incorrect attribute value type... Inappropriate value for attribute "security_rule": set of object required.". Looks like the reference to the map value is not set correctly but can't seem to figure it out. What am I missing? Thanks
SAMPLE CODE
...ANSWER
Answered 2021-Dec-25 at 01:14It should be List of objects, and in your case it is a map of objects. I think the following should work:
QUESTION
I am writing a frontend/backend application. The frontend is an Angular 13 application. The backend is a combination backend API and administration web site. The backend has:
- Local Identity (including Identity scaffolding),
- Web API (for Angular frontend using Swagger bearer tokens),
- MVC view/controllers for side table administration.
The frontend needs to access API services. Login returns a token. The token is used to access the various services to maintain the application tables.
The backend .net 5 Core website reads and writes to a local SQL Server database. The database contains the Identity tables. The backend is also used to maintain the Identity tables using the scaffolding Razor pages. The backend maintains (basic CRUD) for a number of administrative tables. So, a user or an administrator logons via the scaffolding logon form using the same logon account that is used for the Angular frontend.
The problem is the login via PasswordSignInAsync is successful but User.Identity.IsAuthenticated is false. I use User.Identity in lots of places for name, roles and IsAuthenticated. I got a sense that User.Identity is supposed to happen automatically when using cookie authentication scheme. I added dual schemes, but that has not solved the problem. I have read through a number of questions per PasswordSignInAsync not working, but none seemed to help. The things I tried to solve the problem may have adversely affecting the outcome. I have read the source code of CheckPasswordSignInAsync and I do not see any setting of User.Identity. Not knowing what to do to get beyond this issue.
Please feel free to ask for any clarifications.
I’m showing my complete Startup.cs.
...ANSWER
Answered 2021-Dec-24 at 16:35After starting from ground zero, I feel I found the problem. I am now getting logon via Swagger API service (Angular 13) and the logon.cshtml Identity Razor scaffolding page.
When one properly adds the Identity scaffolding, one needs to change/review the IdentityHostingStartup.cs file. My updated IdentityHostingStartup is as follows:
QUESTION
I am trying to using Terraform to automate my VNet setup. this includes setting up the subnet and nsg association. Below partial exerts of the code.
CODE SAMPLE: ...ANSWER
Answered 2021-Dec-24 at 01:28I'm assuming you are creating a collection of azurerm_subnet
resources named "mysubnet" (you are not show that part on your example).
So, the item of your collection is the resource itself, not the type of resource. You should do like this:
QUESTION
We are having difficulties choosing a load balancing solution (Load Balancer, Application Gateway, Traffic Manager, Front Door) for IIS websites on Azure VMs. The simple use case when there are 2 identical sites is covered well – just use Azure Load Balancer or Application Gateway. However, in cases when we would like to update websites and test those updates, we encounter limitation of load balancing solutions.
For example, if we would like to update IIS websites on VM1 and test those updates, the strategy would be:
- Point a load balancer to VM2.
- Update IIS website on VM1
- Test the changes
- If all tests are passed then point the load balancer to VM1 only, while we update VM2.
- Point the load balancer to both VMs
We would like to know what is the best solution for directing traffic to only one VM. So far, we only see one option – removing a VM from backend address pool then returning it back and repeating the process for other VMs. Surely, there must be a better way to direct 100% of traffic to only one (or to specific VMs), right?
Update:
We ended up blocking the connection between VMs and Load Balancer by creating Network Security Group rule with Deny action on Service Tag Load Balancer. Once we want that particular VM to be accessible again we switch the NSG rule from Deny to Allow.
The downside of this approach is that it takes 1-3 minutes for the changes to take an effect. Continuous Delivery with Azure Load Balancer
If anybody can think of a faster (or instantaneous) solution for this, please let me know.
...ANSWER
Answered 2021-Nov-02 at 21:22Without any Azure specifics, the usual pattern is to point a load balancer to a /status endpoint of your process, and to design the endpoint behavior according to your needs, eg:
- When a service is first deployed its status is 'pending"
- When you deem it healthy, eg all tests pass, do a POST /status to update it
- The service then returns status 'ok'
Meanwhile the load balancer polls the /status endpoint every minute and knows to mark down / exclude forwarding for any servers not in the 'ok' state.
Some load balancers / gateways may work best with HTTP status codes whereas others may be able to read response text from the status endpoint. Pretty much all of them will support this general behavior though - you should not need an expensive solution.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nsg
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page