Azure Cloud Shell editor is not opening - azure

Trying to create and edit .yaml file in Azure Cloud Shell (Kubernetes manifest file for testing ingress in AKS). But neither code demo.yaml (or code .), nor clicking on { } is opening editor.
I tried:
Unmounting fileshare (clouddrive unmount) and re-initialized cloudshell (PowerShell)
Used multiple Azure accounts (to check whether the problem is related to any particular account)
Error in chrome dev tool console

Related

How to run yaml file from Azure cloud shell

I have created a Windows Server container on an Azure Kubernetes Service (AKS) cluster using the Azure CLI. While trying to deploy my aspnet core app to the AKS cluster, I am stuck on this step of the above link. I have sample.yaml file on my Windows-10 hard drive that needs to run in the Azure cloud shell using the following command:
kubectl apply -f sample.yaml
Question: Where can I place the above sample.yaml file so I can run the above command in Azure Cloud Shell? I am assuming it probably has to be somewhere in my Azure storage account but where exactly it should be placed so above command can recognize its path? Currently it's giving an expected error: the path "sample.yaml" does not exist
You can directly create a file named sample.yaml using vi or nano or code sample.yaml in the Azure could shell then copy your YAML definition.
For example, type code sample.yaml in the Azure Bash. It opens a sample.yaml file then copy YMAL content and save it. The file automatically was stored in your current working path /home/user.
Or, you can upload your sample.yaml from your local to the Azure path.
Or, you also could persistently store your file into the Azure file share. To find the Azure file share, you can type df command.

Failed to provision a cloud shell, Azure error

I just subscribed to Azure with my Github student, then I start to learn its feature with no error in cloud shell, then I try in the other day my cloud shell pop up this error message:
Requesting a Cloud Shell.Failed to provision a Cloud Shell:
{
"code":"TenantDisabled",
"message":"Cloud Shell has been disabled in directory ...
}
This doesn't seem like a common error unless Cloud Shell has been specifically disabled in your environment. If you see this happening consistently, try removing all your Cloud Shell resources, i.e., the associated Resource group, Storage account and File share and re-configure it again.

Where are files created in Azure Shell text editor located in Azure Portal?

I wonder where are the files saved in Azure Shell text editor located in Azure Portal? In my understanding, when I lunched Azure Shell the very 1st time, a Storage Account and cloud-shell-storage-(region) Resource Group were automatically created for me in Azure Resources. But, when I open cloud-shell-storage-(region) Resource Group in Azure Portal and go to Storage Explorer (preview)/FILE SHARES, I don't see any files that I previously saved in Azure Shell text editor. At the same time, I run ls command in Azure Shell and I can see them all. Is it possible to see those files from Azure Portal at all?
Only the files located in /home/username/clouddrive directory can be seen in the storage file share, the files you stored in /home/username will be stored in the img file e.g. acc_joy.img in the .cloudconsole directory of your file share, you cannot see them.
So if you want to access the file in the file share, you need to store your file in the /home/username/clouddrive, follow the steps below.
Sample:
1.Run cd ./clouddrive/ to go the clouddrive.
2.Run code testfile.txt, the testfile.txt is the file you want to create and store, then the cloud shell will open the editor for you, you could input your stuff, then Save it.
3.Then go to your storage file share, you will find the file is existing.
It also can be available in Storage Explorer (preview).

Connect to Azure File Share from Azure Cloud Shell

I don't know how to connect to an existing Azure File Share from Azure Cloud Shell.
The command clouddrive seems to move my default cloud shell storage account. But I don't want to do that. I just want to access my existing Azure File Share storage. This can exist in any Azurea region (not just what's available for Cloud Shell, which is currently very limited)
When I tried to use clouddrive to mount my existing Azure Files account, I get the following error message:
ERROR: The storage account is not in the valid location. Expect: eastus Actual: canadacentral
I'd prefer not to move my existing Azure File Shares from canadacentral to eastus. Is there a workaround for this?
I'd like to just connect to my existing Azure File Shares through Cloud Shell and run commands in those directories.
Thank you!
Same question asked here:
https://github.com/MicrosoftDocs/azure-docs/issues/42001
https://serverfault.com/questions/992834/connect-to-azure-file-share-from-azure-cloud-shell
Azure cloud shell is an interactive, authenticated, browser-accessible shell which backend is running on cloud shell hosts. The cloud shell machines are temporary but your files are persisted through a mounted file share named clouddrive.
By using the advanced option, you can associate existing resources. Also, the associated Azure storage accounts must reside in the same region as the Cloud Shell machine that you're mounting them to. To find your current region you may run env in Bash and locate the variable ACC_LOCATION.
As the document stated, the canadacentral is not an available region for Cloud Shell, you should mount file storage in the available region. If so, you can run clouddrive unmount to unmount the current file share then select the existing file storage in the available region via clicking advanced settings in the initial login.

Unable to locate the repository cloned from git using Azure cloud shell

I opened Azure Cloud Shell and once the command prompt was ready, I tried git clone https://github.com/Azure-Samples/python-docs-hello-world and it was cloned successfully. However, i am unable to locate where the cloned files are. Need help with the process for locating using Azure Cloud Shell.
The Azure Cloud shell stores the files in a file share within a storage account that you either specified or Azure created for you.
When you use basic settings and select only a subscription, Cloud
Shell creates three resources on your behalf in the supported region
that's nearest to you:
Resource group: cloud-shell-storage-<region>
Storage account: cs<uniqueGuid>
File share: cs-<user>-<domain>-com-<uniqueGuid>
Source.

Resources