Last active
June 2, 2020 22:53
-
-
Save guitarrapc/84675379912cf2ef2f1b68577b3b2f75 to your computer and use it in GitHub Desktop.
trying use VMSS MSI to mount azure file share on Ubuntu 16.04, but failed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YOUR AWESOME VMSS TERRAFORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//<storage_account>.file.core.windows.net/<file_share> /storage/data/<to> cifs nofail,vers=3.0,credentials=/etc/smbcredentials/token.cred,dir_mode=0777,file_mode=0777,serverino 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username=<msi_client_id> | |
password=<msi_access_token> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fstorage.azure.com%2F' -H Metadata:true | jq '.client_id,.access_token' -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo mount -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
umount -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when mount cifs with
mount -a
following error will happen.