When i run the below command in cloud shell.
az aks use-dev-spaces -g aksrgrp -n akscluster
I get the below error. Any help will be highly appreciated
You may be prompted for your administrator password to authorize the installation process.
/tmp/tmpy1vng2we/azds-linux-setup.sh: line 84: sudo: command not found
/tmp/tmpy1vng2we/azds-linux-setup.sh: line 112: sudo: command not found
[INFO] Failed to install dotnet core dependencies.
[INFO] You can manually install all required dependencies based on the following documentation:
[FATAL] https://www.microsoft.com/net/download/dotnet-core/2.1
Azure Dev Spaces CLI not installed properly. Visit 'https://aka.ms/get-azds' for Azure Dev Spaces.
The error shows why the issue happens. It cannot find the command azds. Because the cloud shell does not install the command tool. You can find all the command tools installed in the cloud shell here.
I suggest you can install the tool which you need in the Azure VM of the azure Kubernetes, if you do not find the tool what you want.
It's a better way for you. By the way, the Cloud Shell just enables access to a browser-based command-line experience built with Azure management tasks in mind. So install the Azure CLI in the VM is a better experience.
To add to Charles's answer: the Azure Dev Spaces CLI currently does not support running in the Cloud Shell. Its functionality is designed more for running on your local dev machine where you application's source code is.
Related
i am new
I am trying to use local pc power shell to execute commands like on azure portal power shell.
enter image description here
in my local power shell
i can login to azure using az login.
az commands are running but i am trying to execute pg_dump --help but it say cannot recognize this command. but az commands are working fine.
enter image description here
on azure power shell cli
i can execute all the pg_dumb commands without issue.
please answer.
I think you need to install Azure CLI in order to use the same commands on local powershell:
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli
you need to have also pg_dump and pg_restore command-line utilities installed.
pg_dump is not part of the Azure CLI but is a PostgreSQL client application.
Cloud Shell happens to have a lot of packages installed already (i.E. terraform) and apparently pg_dump.
If you want to use it locally on your client you might want to look at installing the corresponding client tools. Maybe this SO thread helps (if you are running Windows): How do I install just the client tools for PostgreSQL on Windows?
I recently encountered some problems when writing a script for Terrafrom automation.
In my case VM is using proxmox platform, not cloud platform
So I use Telmate/proxmox as my mod for creating VMs(CentOS7)
The VM builds smoothly, but when I want to customize the VM(CentOS7), there are some problems
There is an inline usage in terraform’s remote exec Provisioner.
According to the official documentation, this usage applies to line-by-line instructions
I followed this step and used it on my Provision script, the script did execute normally, and it also spawned the VM and executed the installation script.
The content of the install script is
yum -y install <something package>
install web service
copy web.conf, web program to /path/to/dir
restart web service
But the most important service is not up, but when I start the command in the script via SSH to the VM, the service is normal. That is, this cannot be achieved through terraform’s remote exec
So I want to ask if terraform is not suitable for customizing some services, such as web server, etc.? Only suitable for generating some resources such as VM?
And another custom script needs to be done using such as ansbile?
here is sample code
provisioner "remote-exec" {
inline = [
"yum -y install tar",
"tar -C / -xvf /tmp/product.tar",
"sh install.sh",
]
}
I found a way to understand this matter later, I am not sure if there is a problem with the program written by the developer or other reasons. Anyway, I can't enable the service (process) via script. But it is possible to enable the service by rebooting and using the built-in system service (systemctl).
I have Azure DevOps pipelines using my Windows Self-hosted agent on my intranet.
I want pipelines to create universal packages and I read that I must install an extension to Azure-Cli on the agent for this.
After several errors where system team helped me setup proxy and all, I run this command in elevated command prompt:
az extension add --name azure-devops
I have this error message:
Unable to get extension index.
Response body does not contain valid json. Error detail: Expecting value: line 1 column 1 (char 0)
What could be the issue ?
First of all, as Doris said, you need meet the most basic conditions for installing the azure-devops extension, that is, the version of az cli should be higher than 2.0.69. But as far as I know, this should not be the cause of issue you encountered.
azure cli along with extensions are all built with python. So you will find that "Error detail: Expecting value: line 1 column 1 (char 0)" is a normal JSONParseDecode error if you google it. It has many causes, like empty response, non-json response content, 500/503 error and etc. Without internet trace, I'm afraid it's hard to find the exact cause of it.
Work around:
========================================
To work around this issue so that you can use az devops command to achieve your goal, you can follow below steps:
1) Install the corresponding whl file into your local machine.
2) Retrieve the downloaded whl file location, then run this command from your command line(Here I would show you the sample script I used):
az extension add --source C:\Users\merlinl\Downloads\azure_devops-0.18.0-py2.py3-none-any.whl
3) Now you will see that the azure-devops installed successfully.
Check your CLI version.
You must have at least v2.0.69, which you can verify with az --version command. Refer to this.
I used to use Remove-ServiceFabricNodeState to remove faulted Service Fabric nodes. with this cmdlet i was able to remove a specific node by its name.
However I'm unable to use this cmdlet any more. It is not allowing me to install the module using Install-Module ServiceFabric anymore saying the module cannot be found in the gallery.
Also I'm unable to find a similar cmdlet in iether Az.ServiceFabric or az cli. all that is available is a Remove-AzServiceFabricNode which cannot specify which node I want to remove. It just accepts an integer for how many nodes I want to remove.
I would like to know how can I remove a Node by its name?
To use Remove-ServiceFabricNodeState, just need to install the Azure Service Fabric SDK, it also includes the runtime and tools, after installing it, reopen a PowerShell session, you will be able to use the command.
Besides, you can also use the Azure Service Fabric CLI command sfctl node remove-state as mentioned in another reply, all depend on your requirement.
You can use Azure Service Fabric CLI with
sfctl node remove-state --node-name Node01 --timeout 60
This will remove the state of Node1 with a timeout of 60 seconds. Documnetation
For more information on how to install sfctl see how to install sfctl
Simple version:
Install Python (Version 3.X)
Install Pip
Execute the following command pip install -I sfctl==9.0.0. See table to see which version you need.
I am trying to install Google Cloud SDK on a Linux machine without any Internet access.
I am following the instructions at: https://cloud.google.com/sdk/?hl=en
I downloaded the tar file on my local machine and transferred it to the Linux machine using scp. I then ran the install.sh file and got the following error:
[me#user google-cloud-sdk]$ ./install.sh
Welcome to the Google Cloud SDK!
To help improve the quality of this product, we collect anonymized data on how
the SDK is used. You may choose to opt out of this collection now (by choosing
'N' at the below prompt), or at any time in the future by running the following
command:
gcloud config set --scope=user disable_usage_reporting true
Do you want to help improve the Google Cloud SDK (Y/n)? n
This will install all the core command line tools necessary for working with
the Google Cloud Platform.
/home/me/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py:661: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
exc_message = getattr(exc, 'message', None)
/home/me/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py:664: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
msg = u'({0}) {1}'.format(command_path_string, exc.message)
ERROR: (gcloud.components.update) Failed to fetch component listing from server. Check your network settings and try again.
I have a proxy server that I can use to access the internet from this Linux machine. I tried running install.sh as 'sh install.sh --proxy host:port' but obviously, there is no input parameter called proxy to install.sh.
How can I work around this problem?
Thanks in advance.
Exported my proxy details as "export https_proxy='...'" before running the install.sh file.
This worked for me.
Go to Advanced System settings and create a variable HTTPS_PROXY,
restart CMD.
echo %HTTPS_PROXY%
To make sure it has taken the changes into account.
Launch the install.bat