quarta-feira, maio 17, 2023

GitHub + Azure static web page

1. Create a repository on GitHub.

2. Clone the repository to your local machine using the command:
    #git clone https://github.com/myorg/repo.git

3. Add, commit, and push the code using the following commands:
    #git add .
    #git commit -m "Initial commit"
    #git push -u origin main

4. Create a static web app on Azure.


On the GitHub you can see the actions:


You can have two custom domains on the Static Web App free tier.

terça-feira, maio 09, 2023

Deploy multi-container app using Docker Compose

This is a quick post about how to deploy a multi-container app into Azure Container Instances:

    Log in to Azure (I have access to several tenants, so it makes sense to pass the tenant ID as a parameter):

#docker login azure --tenant-id "yourtenant"

    Create a Docker context (select the subscription and resource group):

#docker context create aci mycontext

    If you have more than one context, you can select it using the command below:

#docker context use "yourcontext"

    Check the current context:

#docker context show

    Deploy your Docker Compose:

#docker compose up

Tip:

Below is the code that you must add to your Docker Compose file if you need an external volume (Azure Files). This code mounts a volume on /opt/test.

services:
  myservice:
    container_name: mycontainer
    image: xxxxxx:latest   
    volumes:
      - storagevolume:/opt/test
volumes:
  storagevolume:
    driver: azure_file
    driver_opts:
      share_name: share
      storage_account_name: accountname
      storage_account_key: "XXXXXXXX=="


segunda-feira, junho 13, 2022

Gsuite to Microsoft 365 - Error creating endpoint Looks like you do not have permission

I was working on migration and when I tried to create an endpoint I got:

"Error creating endpoint. Looks like you do not have permission".

I tested the communication using the Test-MigrationServerAvailability cmdlets and I got access denied.

Command:

>Test-MigrationServerAvailability -Gmail -ServiceAccountKeyFileData $([System.IO.File]::ReadAllBytes("C:\\Users\\Maykon\\Downloads\\office365migration.json")) -EmailAddress yourgmailsuperuse@contoso.com

 The problem was related to the Domain-wide delegation, I added this to the API Scope:

https://mail.google.com/https://www.google.com/m8/feeds,https://www.googleapis.com/auth/contacts.readonly,https://www.googleapis.com/auth/calendar.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/drive,https://sites.google.com/feeds/,https://www.googleapis.com/auth/gmail.settings.sharing,https://www.googleapis.com/auth/gmail.settings.basic,https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/calendar,https://www.google.com/m8/feeds/,https://www.googleapis.com/auth/contacts 

After that, the Endpoint was created with success.

Source:
Migration from google g suite to office 365 - Error: MigrationPermanentException: The call to https://www.googleapis.com/oauth2/v4/token returned with status code Unauthorized: - Microsoft Q&A

segunda-feira, abril 04, 2022

Remote Gateway - ID Event 304

 I have configured a Remote Gateway (Just for test, all RDS roles in the same server) but I was unable to connect to the server, when I checked the logs (Location: Microsoft-Windows-TerminalServices-Gateway/Operational) I found this:

The user "MAYKONRDS\maykonadmin", on client computer "9x.2x.9x.7x", met connection authorization policy and resource authorization policy requirements, but could not connect to resource "rdsvmgw.southcentralus.cloudapp.azure.com". Connection protocol used: "HTTP". The following error occurred: "23005".

Solution:

Just configure your Internal DNS (you can use the hosts file as well) and point the address rdsvmgw.southcentralus.cloudapp.azure.com (in my case) to your Remote Gateway, I added on my hosts file, and works:

127.0.0.1    rdsvmgw.southcentralus.cloudapp.azure.com