Giter VIP home page Giter VIP logo

devops-course's Introduction

devops-course

az-oidc-test GitHub license

image

Azure login cli

az login --use-device-code
az account list
[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "1d31*888888888888*d1",
    "id": "e14444444444444a1a687",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Azure subscription 1",
    "state": "Enabled",
    "tenantDefaultDomain": "dmy44444444t.com",
    "tenantDisplayName": "Default Directory",
    "tenantId": "144444441d1",
    "user": {
      "name": "dm44444444.com",
      "type": "user"
    }
  }
]
az account show --output table
account show --output table
EnvironmentName    HomeTenantId                          IsDefault    Name                  State    TenantDefaultDomain                      TenantDisplayName    TenantId
-----------------  ------------------------------------  -----------  --------------------  -------  ---------------------------------------  -------------------  ------------------------------------
AzureCloud         1d3********************************d1  True         Azure subscription 1  Enabled  dm********************************.com  Default Directory    1d*************************d1
terraform output -raw sp_password > secureadmin

MongoDB Community Edition

To install MongoDB, run the following command in your macOS Terminal application

brew install [email protected]

The installation includes the following binaries:

  • The mongod server

  • The mongos sharded cluster query router

  • The MongoDB Shell, mongosh

Intel Processor configuration file
/usr/local/etc/mongod.conf
/usr/local/var/log/mongodb
/usr/local/var/mongodb

Apple Silicon Processor
/opt/homebrew/etc/mongod.conf
/opt/homebrew/var/log/mongodb
/opt/homebrew/var/mongodb
brew services list

brew services start [email protected]

brew services stop [email protected]
mongodb git:(nextjs-docker) ✗ mongosh   
Current Mongosh Log ID: 666a8f5cafb1a67a700a25d4
Connecting to:          mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.6
Using MongoDB:          7.0.11
Using Mongosh:          2.2.6

For mongosh info see: https://docs.mongodb.com/mongodb-shell/

------
   The server generated these startup warnings when booting
   2024-06-13T08:18:50.841+02:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
------
rs.initiate({_id:"rs0", members: [{_id:0, host:"127.0.0.1:27017", priority:100}, {_id:1, host:"127.0.0.1:27018", priority:50}, {_id:2, host:"127.0.0.1:27019", arbiterOnly:true}]})

{ ok: 1 }


git commit -m "fix: correct minor typos in code"
git commit -m "feat: add new user login functionality"
git commit -m "chore: update npm dependencies"
git commit -m "docs: update README with new instructions"
git commit -m "style: format code with Prettier"
git commit -m "refactor: extract utility functions for reuse"
git commit -m "perf: optimize database query performance"
git commit -m "test: add unit tests for authentication module"
git commit -m "build: update webpack configuration"
git commit -m "ci: update TravisCI config to run tests on latest Node versions"
git commit -m "revert: revert 'feat: add new user login functionality'"

helm install argo-cd argo/argo-cd --values argo-cd/my-values.yaml server.insecure: true

devops-course's People

Contributors

dimaserbenyuk avatar dmytro-serbeniuk avatar github-actions[bot] avatar dmytrokaliuzhnyi avatar

Stargazers

Вахтанг avatar

Watchers

 avatar  avatar

devops-course's Issues

Store Terraform state in Azure Storage

use Terraform https://learn.microsoft.com/en-us/azure/developer/terraform/store-state-in-azure-storage?tabs=azure-cli

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~>3.0"
    }
  }
  backend "azurerm" {
      resource_group_name  = "tfstate"
      storage_account_name = "<storage_account_name>"
      container_name       = "tfstate"
      key                  = "terraform.tfstate"
  }

}

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "state-demo-secure" {
  name     = "state-demo"
  location = "eastus"
}

Terraform Configuration Drift Detected

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # azuread_application.this will be updated in-place
  ~ resource "azuread_application" "this" {
        id                             = "/applications/d122079b-1325-4377-b97c-99aa20a31752"
      ~ owners                         = [
          + "e12aa1f9-da27-407f-bb32-0ca5ffdc868f",
            # (1 unchanged element hidden)
        ]
        tags                           = []
        # (25 unchanged attributes hidden)

        # (7 unchanged blocks hidden)
    }

  # azuread_service_principal.this will be updated in-place
  ~ resource "azuread_service_principal" "this" {
        id                            = "e12aa1f9-da27-407f-bb32-0ca5ffdc868f"
      ~ owners                        = [
          + "e12aa1f9-da27-407f-bb32-0ca5ffdc868f",
            # (1 unchanged element hidden)
        ]
        tags                          = []
        # (24 unchanged attributes hidden)

        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

Create a resource group

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

Terraform Configuration Drift Detected

Terraform Plan Output

Click to expand
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # azurerm_storage_account.tfstate will be updated in-place
  ~ resource "azurerm_storage_account" "tfstate" {
        id                                = "/subscriptions/e135f274-9024-40cf-87e9-a8afb4a1a687/resourceGroups/serbeniuk/providers/Microsoft.Storage/storageAccounts/tfstate44be2df5"
        name                              = "tfstate44be2df5"
      ~ tags                              = {
          - "test" = "test" -> null
        }
        # (63 unchanged attributes hidden)

        # (4 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Azure subscriptions with the Azure CLI

The Azure CLI helps you manage your Azure subscription, create management groups, and lock subscriptions.You might have multiple subscriptions within Azure. You can be part of more than one organization or your organization might divide access to certain resources across groupings. The Azure CLI supports selecting a subscription both globally and per command.

  • install azure cli
  • login to Azure console

@skvladimir @DmytroKaliuzhnyi @[email protected]

Use Azure Provider

Azure Provider

terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "3.106.1"
    }
  }
}

provider "azurerm" {
  # Configuration options
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.