github.com/sentienttechnologies/studio-go-runner@v0.0.0-20201118202441-6d21f2ced8ee/cloud/aws/minio/README.md (about)

     1  # Azure deployment
     2  
     3  Change the user-data file to contain your generated or preferred SSH administration key, in this case of this example we pasted in the contents of the $HOME/.ssh/id_ed25519.pub file into the user-data file as an item inside the ssh-authorized-keys yaml block.  You can run the following command to generate a key if you are not sure that you have one really.
     4  
     5  ```shell
     6  echo "n" | ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519
     7  export PUBLIC_KEY=`cat ~/.ssh/id_ed25519.pub`
     8  ```
     9  
    10  You will also need to define environment variables to specify the MINIO_ACCESS_KEY, MINIO_SECRET_KEY as environment variables.  These should be protected secrets that you choose and will need to pass to anyone wishing to upload and download data on this server.
    11  
    12  ```shell
    13  storage_account=`echo -e "bootlogs$(uuidgen | md5sum - | cut -c1-8)"`
    14  export MINIO_ACCESS_KEY=[An access key you choose and is secret to you, and users of StudioML, LEAF]
    15  export MINIO_SECRET_KEY=[A secret key you choose and is secret to you, and users of StudioML, LEAF.  Must be at least 8 characters in length.]
    16  envsubst < user-data > user-data-$storage_account
    17  az login --use-device-code
    18  az group create --name minio --location eastus -o none
    19  az storage account create --resource-group minio --name $storage_account  --sku standard_lrs -o none
    20  az vm create --name minio --resource-group minio --location eastus --data-disk-sizes-gb 10 --boot-diagnostics-storage $storage_account --authentication-type ssh --generate-ssh-keys --image Canonical:UbuntuServer:18.04-LTS:latest --public-ip-address-allocation static --size Standard_D4s_v3 --custom-data user-data-$storage_account -o none
    21  export MINIO_ADDRESS=$(az network public-ip list --resource-group minio --query "[].ipAddress" --output tsv)
    22  az vm open-port --port 9000 --resource-group minio --name minio -o none
    23  ```
    24  
    25  ## Shell access
    26  ssh ubuntu@$MINIO_ADDRESS -i ~/.ssh/id_ed25519
    27  
    28  ## Diagnostics
    29  
    30  az vm boot-diagnostics get-boot-log --ids $(az vm list -g minio --query "[].id" -o tsv)
    31  
    32  # Testing
    33  
    34  Validating the cloud-init schema
    35  
    36  cloud-init devel schema --config-file user-data
    37  
    38  
    39  https://blog.simos.info/how-to-preconfigure-lxd-containers-with-cloud-init/
    40  
    41  lxc profile copy default devprofile
    42  lxc profile show devprofile
    43  
    44  lxc profile set devprofile user.user-data "$( cat user-data )"
    45  
    46  lxc launch --profile devprofile ubuntu:18.04 junk
    47  
    48  lxc file pull junk/var/log/cloud-init.log -
    49  
    50  lxc delete junk --force