How to I map a storage account in Linux PHP7.2 in PAAS Azure - azure

Being quite new to Azure, does anyone know how to map a Blob File storage on Linux PHP7.2 box as PAAS ?
I looked at the documentation followed the instruction, but they do not work on my App Service.
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux
According to this documentation, Blobfuse needs to be installed in order for this to work.
I cannot install Blobfuse, lsb_release -a does not work (part of the instructions), according to terminal the installed package is linux 4.4.0-128.154.
I can find a Wordpress plugin that uses the Wordpress CLI, but that is not really what I am looking for. (I dont use Wordpress on my site, but I thought the code could give me a hint)
I am just looking for a file share to add store uploaded images.
Has anyone done this before?
Thanks in advance !

Related

Autoinstall custom Linux image

We are facing now a new challenge, how can we autoinstall a Linux image I created.
I am installing my custom Linux image on a Windows 10 Mini pc. I would like the auto install to run on boot for a security and automation reasons.
I used Clonezilla in order to capture and restore a custom image. It worked with S3fs as well.
I tried to enable PXE, but it didn't work. From a screen that says PXE..... I just went again to Windows loading logo.
So the process:
I created a custom image with all the dependencies and services I need in order the application to run, I captured it with Clonezilla and restored it with the same open source application. It was great. Now we would like to automate the process as much as we can in order to deploy the image on a verity of physicals servers.
My main issue right now with Clonezilla is that in order to restore from S3 for example I need to use S3fs and I have to create a credentials file with my access key id and secret access key each time I restore an image. Repetitive and insecure.
I explored the idea of autoinstall the image with PXE over the internet, interesting but I haven't fully understand the process.
We are not cancelling an payment application, if it's stable and provide support.
If anyone know how I can create a new Clonezilla image with my AWS credentials file exist it could be helpful, if anyone can share his experience with auto install custom image over the internet with PXE it would be helpful, or even an experience with a different tool that works for you, I would love to hear about it.
Please le me know if I need to add addition information and details or if this is not the right thread for this question.
Thank you for your help

Azure Migration Assesment on Linux

I want to test Azure's monitoring tool on linux. I found this document form Microsoft. I did everything exactly the same. But when it comes to restart the service, I get the .
How can I fix that?

Is it mandatory to install WALinuxAgent?

I'm creating a custom vhd image to make it available in azure market place. Its an inbuild centos 7 machine and I want to load it as an image. Is it mandatory to have WALinuxAgent agent to be installed as part of the image? Here is the documentation which says to install it https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-centos#centos-70. I want to exclude that package from the image. Is that okay to do that ?
You do need it, otherwise the VM may not boot. This agent communicates with the Azure fabric to provide VM status amongst other things. You can find more information about it here: https://github.com/Azure/WALinuxAgent

How do I work locally with files in my Cloud Shell profile

Either this isn't possible, or it's so simple, I am missing the trick or I am going about it the wrong way. Similar to this question.
I prefer working with VS Code and basically, I want to treat the home path in cloud CLI as a local folder, exposed to VS Code.
I have installed the following VS Code extensions:
Azure Account
Azure Storage
Azure CLI Tools
If I connect to cloud shell via VS Code (F1 > Azure:Open Bash in Cloud Shell) (as explained here) or through the Portal, I have a home directory /home/john, where I can put files. It is this area I want to connect to from my PC (via VS Code).
My first thought was that this area would be exposed in Azure Storage Explorer, however, the only thing in my cloud shell storage account is: File Shares: azclishare > .cloudconsole > acc_john.img. There is no sign of any of the files in /home/john. I'm guessing they're wrapped up in acc_john.img.
I also though about using SCP, but I can't find any reference to this either and I can't find any "connection strings" in the portal.
If anyone has any ideas, I'd be grateful if you could share...
P.S. I am using Windows 10.
It's always the same, post a question on SO then find the answer!
The full answer is here: https://learn.microsoft.com/en-us/azure/cloud-shell/persisting-shell-storage
The short answer is that Cloud Shell does map to the storage account (files), but to /usr/john/clouddrive.
In fact, there is a symlink to clouddrive in /home/john.

Azure Powershell Linux

Are there any more cmdlets for Linux Azure Powershell apart from these?
Is there an official repository for Azure Powershell for Linux?
Is there a way for terminal to launch powershell on startup, not bash?
My google-fu is weak today :(
Your question is old but I'll still answer it. In hopes that you will receive my response via email, others seeking help in the future will see this, and to establish reputation on this damn site so I can actually start using it effectively.
Are there any more cmdlets for Linux Azure Powershell apart from these?
I assume you're specifically looking for Azure because of your title. AzureRM.Netcore has been released as of ~1 month ago. This supports 90% of the functionality you need to deploy to Azure.
https://www.powershellgallery.com/packages/AzureRM.Netcore/0.9.1
Unfortunately, I am finding that some older cmdlets are not supported yet though, since they are in an older module called Azure, which does not yet have a .NET Core implementation. See my recent post for more information on that.
Is there an official repository for Azure Powershell for Linux?
You can find all of that discussion on the official Powershell repository. It is cross-platform. Additionally Microsoft intends to build Powershell 6 on top of .NET Core 2.0 which was released yesterday. So it's likely that future development will heavily support Linux. This will be your best resource: https://github.com/Azure/azure-powershell
Is there a way for terminal to launch powershell on startup, not bash?
There is. But I wouldn't recommend doing that. That just sounds wrong. But I'm a pretentious Linux user with a bias towards Microsoft so take my opinion with a grain of salt. There are two methods you can use to accomplish that.
1) Most Linux distros come with a command called chsh just for that. Try chsh -s /usr/bin/powershell provide that is the location of your installed Powershell binary. If you are not sure where it is, you can use which to determine the installation location. which powershell. Do not execute this command with sudo as that will attempt to change the shell for your root user rather than your current user.
2) Alternatively you can manually edit the file /etc/passwd on Linux. Locate the line that contains your user account, go to the very end of it, and replace /bin/bash or whatever shell you use with /usr/bin/powershell, or the proper location of your Powershell Binary.

Resources