Friday, June 4, 2021

Create Azure VM using Terraform

HOWTO

 

Differences Between On-Premise, SaaS, PaaS, IaaS

GitHub

 Install Terraform on Fedora

https://learn.hashicorp.com/tutorials/terraform/install-cli

 

sudo dnf install -y dnf-plugins-core

sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo

sudo dnf -y install terraform


Install Azure CLI

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-yum


Verify installation

[dave@dave ~]$ terraform version
Terraform v0.13.5
[dave@dave ~]$ az version
{
  "azure-cli": "2.14.2",
  "azure-cli-core": "2.14.2",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {}
}

Login via Azure CLI using own credentials

https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli

$ az login
[dave@dave azure]$ az account show
{
  "environmentName": "AzureCloud",
  "homeTenantId": "23432432423-2342423423",
  "id": "3234234234-234234234",
  "isDefault": true,
  "managedByTenants": [],
  "name": "Free Trial",
  "state": "Enabled",
  "tenantId": "234234234-234234234",
  "user": {
    "name": "daniel.veselka",
    "type": "user"
  }
}


Authenticate to Azure using service principal variables

https://docs.microsoft.com/en-us/azure/developer/terraform/get-started-cloud-shell#authenticate-via-azure-service-principal

Get values for service principal and store them into env vars ARM_* 

A Service Principal is an application within Azure Active Directory whose authentication tokens can be used as the client_id, client_secret, and tenant_id fields needed by Terraform (subscription_id can be independently recovered from your Azure account details).

Set subscription to use with Terraform

https://docs.microsoft.com/en-us/azure/developer/terraform/get-started-cloud-shell#set-the-current-azure-subscription


az account set --subscription="<subscription_id>"

Export Azure principle secrets variables

 https://www.terraform.io/docs/providers/azurerm/guides/service_principal_client_secret.html

$ export ARM_CLIENT_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_CLIENT_SECRET="00000000-0000-0000-0000-000000000000"
$ export ARM_SUBSCRIPTION_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_TENANT_ID="00000000-0000-0000-0000-000000000000"


Find Centos OS Azure image

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage

 az vm image list -l westeurope --publisher openlogic --offer centos --sku 8 --all -o table 
Offer                      Publisher    Sku              Urn                                                                 Version
-------------------------  -----------  ---------------  ------------------------------------------------------------------  --------------
CentOS                     OpenLogic    8_3              OpenLogic:CentOS:8_3:8.3.2020120900                                 8.3.2020120900
CentOS                     OpenLogic    8_3              OpenLogic:CentOS:8_3:8.3.2021020400                                 8.3.2021020400
CentOS                     OpenLogic    8_3-gen2         OpenLogic:CentOS:8_3-gen2:8.3.2020120901                            8.3.2020120901
CentOS                     OpenLogic    8_3-gen2         OpenLogic:CentOS:8_3-gen2:8.3.2021020401                            8.3.2021020401

 

Install VSCode with Terraform extension

For VSCode installation see here  https://danielveselka.blogspot.com/2020/11/google-cloud-code-ide-extension.html 

https://github.com/hashicorp/vscode-terraform

 

Choose VM size

https://docs.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable

Create VM

https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure

 https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/examples/virtual-machines/linux/basic-ssh/main.tf

https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/examples/virtual-machines/linux/custom-data/main.tf

[dave@dave azure]$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/tls...
- Finding latest version of hashicorp/azurerm...
- Installing hashicorp/tls v3.0.0...
- Installed hashicorp/tls v3.0.0 (signed by HashiCorp)
- Installing hashicorp/azurerm v2.36.0...
- Installed hashicorp/azurerm v2.36.0 (signed by HashiCorp)

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, we recommend adding version constraints in a required_providers block
in your configuration, with the constraint strings suggested below.

* hashicorp/azurerm: version = "~> 2.36.0"
* hashicorp/tls: version = "~> 3.0.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.


 Terraform plan

[dave@dave azure]$ terraform plan

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # azurerm_linux_virtual_machine.daveterraformvm will be created
  + resource "azurerm_linux_virtual_machine" "daveterraformvm" {
      + admin_username                  = "centos"
      + allow_extension_operations      = true
      + computer_name                   = (known after apply)
      + disable_password_authentication = true
      + extensions_time_budget          = "PT1H30M"
      + id                              = (known after apply)
      + location                        = "westeurope"
      + max_bid_price                   = -1
      + name                            = "dave_terraform_test"
      + network_interface_ids           = (known after apply)
      + platform_fault_domain           = -1
      + priority                        = "Regular"
      + private_ip_address              = (known after apply)
      + private_ip_addresses            = (known after apply)
      + provision_vm_agent              = true
      + public_ip_address               = (known after apply)
      + public_ip_addresses             = (known after apply)
      + resource_group_name             = "rg-dave-terraform-test"
      + size                            = "Standard_DS3_v2"
      + virtual_machine_id              = (known after apply)
      + zone                            = (known after apply)

      + admin_ssh_key {
          + public_key = <<-EOT
                ssh-rsa ererererererer dave@dave
            EOT
          + username   = "centos"
        }

      + os_disk {
          + caching                   = "ReadWrite"
          + disk_size_gb              = (known after apply)
          + name                      = (known after apply)
          + storage_account_type      = "Premium_LRS"
          + write_accelerator_enabled = false
        }

      + source_image_reference {
          + offer     = "CentOS"
          + publisher = "OpenLogic"
          + sku       = "8_3"
          + version   = "latest"
        }
    }

  # azurerm_network_interface.daveterraformnic will be created
  + resource "azurerm_network_interface" "daveterraformnic" {
      + applied_dns_servers           = (known after apply)
      + dns_servers                   = (known after apply)
      + enable_accelerated_networking = false
      + enable_ip_forwarding          = false
      + id                            = (known after apply)
      + internal_dns_name_label       = (known after apply)
      + internal_domain_name_suffix   = (known after apply)
      + location                      = "westeurope"
      + mac_address                   = (known after apply)
      + name                          = "daveNIC"
      + private_ip_address            = (known after apply)
      + private_ip_addresses          = (known after apply)
      + resource_group_name           = "rg-dave-terraform-test"
      + tags                          = {
          + "environment" = "Terraform Demo"
        }
      + virtual_machine_id            = (known after apply)

      + ip_configuration {
          + name                          = "daveNicConfiguration"
          + primary                       = (known after apply)
          + private_ip_address            = (known after apply)
          + private_ip_address_allocation = "dynamic"
          + private_ip_address_version    = "IPv4"
          + public_ip_address_id          = (known after apply)
          + subnet_id                     = (known after apply)
        }
    }

  # azurerm_network_interface_security_group_association.dave will be created
  + resource "azurerm_network_interface_security_group_association" "dave" {
      + id                        = (known after apply)
      + network_interface_id      = (known after apply)
      + network_security_group_id = (known after apply)
    }

  # azurerm_network_security_group.daveterraformnsg will be created
  + resource "azurerm_network_security_group" "daveterraformnsg" {
      + id                  = (known after apply)
      + location            = "westeurope"
      + name                = "daveNetworkSecurityGroup"
      + resource_group_name = "rg-dave-terraform-test"
      + security_rule       = [
          + {
              + access                                     = "Allow"
              + description                                = ""
              + destination_address_prefix                 = "*"
              + destination_address_prefixes               = []
              + destination_application_security_group_ids = []
              + destination_port_range                     = "22"
              + destination_port_ranges                    = []
              + direction                                  = "Inbound"
              + name                                       = "SSH"
              + priority                                   = 1001
              + protocol                                   = "Tcp"
              + source_address_prefix                      = "*"
              + source_address_prefixes                    = []
              + source_application_security_group_ids      = []
              + source_port_range                          = "*"
              + source_port_ranges                         = []
            },
        ]
      + tags                = {
          + "environment" = "Terraform Demo"
        }
    }

  # azurerm_public_ip.daveterraformpublicip will be created
  + resource "azurerm_public_ip" "daveterraformpublicip" {
      + allocation_method       = "Dynamic"
      + fqdn                    = (known after apply)
      + id                      = (known after apply)
      + idle_timeout_in_minutes = 4
      + ip_address              = (known after apply)
      + ip_version              = "IPv4"
      + location                = "westeurope"
      + name                    = "davePublicIP"
      + resource_group_name     = "rg-dave-terraform-test"
      + sku                     = "Basic"
      + tags                    = {
          + "environment" = "Terraform Demo"
        }
    }

  # azurerm_resource_group.daveterraformgroup will be created
  + resource "azurerm_resource_group" "daveterraformgroup" {
      + id       = (known after apply)
      + location = "westeurope"
      + name     = "rg-dave-terraform-test"
      + tags     = {
          + "environment" = "Terraform Demo"
        }
    }

  # azurerm_subnet.daveterraformsubnet will be created
  + resource "azurerm_subnet" "daveterraformsubnet" {
      + address_prefix                                 = (known after apply)
      + address_prefixes                               = [
          + "10.0.1.0/24",
        ]
      + enforce_private_link_endpoint_network_policies = false
      + enforce_private_link_service_network_policies  = false
      + id                                             = (known after apply)
      + name                                           = "daveSubnet"
      + resource_group_name                            = "rg-dave-terraform-test"
      + virtual_network_name                           = "daveVnet"
    }

  # azurerm_virtual_network.daveterraformnetwork will be created
  + resource "azurerm_virtual_network" "daveterraformnetwork" {
      + address_space         = [
          + "10.0.0.0/16",
        ]
      + guid                  = (known after apply)
      + id                    = (known after apply)
      + location              = "westeurope"
      + name                  = "daveVnet"
      + resource_group_name   = "rg-dave-terraform-test"
      + subnet                = (known after apply)
      + tags                  = {
          + "environment" = "Terraform Demo"
        }
      + vm_protection_enabled = false
    }

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

 

Terraform apply

Create VM using https://github.com/dveselka/devops-terraform/blob/master/azure/main.tf

$ terraform apply
azurerm_resource_group.daveterraformgroup: Refreshing state... [id=/subscriptions/3434343-334/resourceGroups/rg-dave-terraform-test]
azurerm_virtual_network.daveterraformnetwork: Refreshing state... [id=/subscriptions/43443-434-3434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/virtualNetworks/daveVnet]
azurerm_network_security_group.daveterraformnsg: Refreshing state... [id=/subscriptions/434343-43-43/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkSecurityGroups/daveNetworkSecurityGroup]
azurerm_public_ip.daveterraformpublicip: Refreshing state... [id=/subscriptions/343434-43434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/publicIPAddresses/davePublicIP]
azurerm_subnet.daveterraformsubnet: Refreshing state... [id=/subscriptions/343434-43434/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/virtualNetworks/daveVnet/subnets/daveSubnet]
azurerm_network_interface.daveterraformnic: Refreshing state... [id=/subscriptions/3434-434343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkInterfaces/daveNIC]
azurerm_network_interface_security_group_association.dave: Refreshing state... [id=/subscriptions/3434-434343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/....

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply":


Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to undo or respond
to these changes.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # azurerm_linux_virtual_machine.daveterraformvm will be created
  + resource "azurerm_linux_virtual_machine" "daveterraformvm" {
      + admin_username                  = "centos"
      + allow_extension_operations      = true
      + computer_name                   = (known after apply)
      + disable_password_authentication = true
      + extensions_time_budget          = "PT1H30M"
      + id                              = (known after apply)
      + location                        = "westeurope"
      + max_bid_price                   = -1
      + name                            = "dave-terraform-test"
      + network_interface_ids           = [
          + "/subscriptions/45454-54-54-545/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Network/networkInterfaces/daveNIC",
        ]
      + platform_fault_domain           = -1
      + priority                        = "Regular"
      + private_ip_address              = (known after apply)
      + private_ip_addresses            = (known after apply)
      + provision_vm_agent              = true
      + public_ip_address               = (known after apply)
      + public_ip_addresses             = (known after apply)
      + resource_group_name             = "rg-dave-terraform-test"
      + size                            = "Standard_A2_v2"
      + virtual_machine_id              = (known after apply)
      + zone                            = (known after apply)

      + admin_ssh_key {
          + public_key = <<-eot 0="" 1="" 2m49s="" above.="" accepted="" actions="" add="" added="" after="" apply="" approve.="" artrterteteteterte="" azure="" azurerm_linux_virtual_machine.daveterraformvm:="" be="" caching="ReadWrite" change="" changed="" code="" complete="" creating...="" creation="" dave="" described="" destroy.="" destroyed.="" disk_size_gb="(known" do="" elapsed="" eot="" id="/subscriptions/e535613a-7524-4b38-8915-ad04b02fe3d0/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Compute/virtualMachines/dave-terraform-test]" m0s="" m10s="" m20s="" m30s="" m40s="" m50s="" name="(known" offer="CentOS" only="" os_disk="" perform="" plan:="" publisher="OpenLogic" resources:="" s="" sku="8_3" source_image_reference="" ssh-rsa="" still="" storage_account_type="Standard_LRS" terraform="" the="" these="" to="" username="centos" version="latest" want="" will="" write_accelerator_enabled="false" yes="" you="">
azurerm_linux_virtual_machine.daveterraformvm: Creating... azurerm_linux_virtual_machine.daveterraformvm: Still creating... [10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [50s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m0s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [1m50s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m0s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m10s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m20s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m30s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Still creating... [2m40s elapsed] azurerm_linux_virtual_machine.daveterraformvm: Creation complete after 2m49s [id=/subscriptions/34343-4343/resourceGroups/rg-dave-terraform-test/providers/Microsoft.Compute/virtualMachines/dave-terraform-test] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. [dave@dave azure]$

 

 Check VM in Azure Console

https://portal.azure.com/



SSH into VM
[dave@dave azure]$ ssh centos@20.73.164.213
The authenticity of host '20.73.164.213 (20.73.164.213)' can't be established.
ECDSA key fingerprint is SHA256:ovtXmI52ndfouGE97PX4foS099J2lj91xie4cRQz8w8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '20.73.164.213' (ECDSA) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket

[centos@dave-terraform-test ~]$ more /etc/redhat-release
CentOS Linux release 8.3.2011


Saturday, April 10, 2021

Gradle test project

HOWTO

GitHub repo

Initialize project 

[dave@dave git]$ cd gradle-demo/
[dave@dave gradle-demo]$ gradle init

Select type of project to generate:
  1: basic
  2: application
  3: library
  4: Gradle plugin
Enter selection (default: basic) [1..4] 2

Select implementation language:
  1: C++
  2: Groovy
  3: Java
  4: Kotlin
  5: Scala
  6: Swift
Enter selection (default: Java) [1..6] 3

Split functionality across multiple subprojects?:
  1: no - only one application project
  2: yes - application and library projects
Enter selection (default: no - only one application project) [1..2] 2

Select build script DSL:
  1: Groovy
  2: Kotlin
Enter selection (default: Groovy) [1..2] 1

Project name (default: gradle-demo): 
Source package (default: gradle.demo): 

> Task :init
Get more help with your project: https://docs.gradle.org/7.0/samples/sample_building_java_applications_multi_project.html

BUILD SUCCESSFUL in 41s
2 actionable tasks: 2 executed

Project structure
[dave@dave gradle-demo]$ find
.
./gradle
./gradle/wrapper
./gradle/wrapper/gradle-wrapper.jar
./gradle/wrapper/gradle-wrapper.properties
./settings.gradle
./.gradle
./.gradle/configuration-cache
./.gradle/configuration-cache/gc.properties
./.gradle/7.0
./.gradle/7.0/fileChanges
./.gradle/7.0/fileChanges/last-build.bin
./.gradle/7.0/gc.properties
./.gradle/7.0/dependencies-accessors
./.gradle/7.0/dependencies-accessors/gc.properties
./.gradle/7.0/dependencies-accessors/dependencies-accessors.lock
./.gradle/7.0/vcsMetadata-1
./.gradle/7.0/executionHistory
./.gradle/7.0/executionHistory/executionHistory.lock
./.gradle/7.0/executionHistory/executionHistory.bin
./.gradle/7.0/fileHashes
./.gradle/7.0/fileHashes/fileHashes.lock
./.gradle/7.0/fileHashes/fileHashes.bin
./.gradle/buildOutputCleanup
./.gradle/buildOutputCleanup/buildOutputCleanup.lock
./.gradle/buildOutputCleanup/outputFiles.bin
./.gradle/buildOutputCleanup/cache.properties
./.gradle/checksums
./.gradle/checksums/checksums.lock
./.gradle/vcs-1
./.gradle/vcs-1/gc.properties
./gradlew.bat
./buildSrc
./buildSrc/build.gradle
./buildSrc/src
./buildSrc/src/main
./buildSrc/src/main/groovy
./buildSrc/src/main/groovy/gradle.demo.java-common-conventions.gradle
./buildSrc/src/main/groovy/gradle.demo.java-library-conventions.gradle
./buildSrc/src/main/groovy/gradle.demo.java-application-conventions.gradle

./app
./app/build.gradle
./app/src
./app/src/main
./app/src/main/java
./app/src/main/java/gradle
./app/src/main/java/gradle/demo
./app/src/main/java/gradle/demo/app
./app/src/main/java/gradle/demo/app/MessageUtils.java
./app/src/main/java/gradle/demo/app/App.java
./app/src/main/resources
./app/src/test
./app/src/test/java
./app/src/test/java/gradle
./app/src/test/java/gradle/demo
./app/src/test/java/gradle/demo/app
./app/src/test/java/gradle/demo/app/MessageUtilsTest.java
./app/src/test/resources
./.gitattributes
./utilities
./utilities/build.gradle
./utilities/src
./utilities/src/main
./utilities/src/main/java
./utilities/src/main/java/gradle
./utilities/src/main/java/gradle/demo
./utilities/src/main/java/gradle/demo/utilities
./utilities/src/main/java/gradle/demo/utilities/SplitUtils.java
./utilities/src/main/java/gradle/demo/utilities/StringUtils.java
./utilities/src/main/java/gradle/demo/utilities/JoinUtils.java
./utilities/src/main/resources
./utilities/src/test
./utilities/src/test/resources
./gradlew
./README.md
./list
./list/build.gradle
./list/src
./list/src/main
./list/src/main/java
./list/src/main/java/gradle
./list/src/main/java/gradle/demo
./list/src/main/java/gradle/demo/list
./list/src/main/java/gradle/demo/list/LinkedList.java
./list/src/main/resources
./list/src/test
./list/src/test/java
./list/src/test/java/gradle
./list/src/test/java/gradle/demo
./list/src/test/java/gradle/demo/list
./list/src/test/java/gradle/demo/list/LinkedListTest.java
./list/src/test/resources
./.gitignore

Main
[dave@dave gradle-demo]$ more settings.gradle 
/*
 * This file was generated by the Gradle 'init' task.
 *
 * The settings file is used to specify which projects to include in your build.
 *
 * Detailed information about configuring a multi-project build in Gradle can be found
 * in the user manual at https://docs.gradle.org/7.0/userguide/multi_project_builds.html
 */

rootProject.name = 'gradle-demo'
include('app', 'list', 'utilities')

Run tests
[dave@dave gradle-demo]$ ./gradlew check
Downloading https://services.gradle.org/distributions/gradle-7.0-bin.zip
..........10%...........20%...........30%..........40%...........50%...........60%...........70%..........80%...........90%...........100%

BUILD SUCCESSFUL in 32s
9 actionable tasks: 9 executed

Run application
[dave@dave gradle-demo]$ ./gradlew run

> Task :app:run
Hello World!

BUILD SUCCESSFUL in 989ms
6 actionable tasks: 1 executed, 5 up-to-date

Build
[dave@dave gradle-demo]$ ./gradlew build

BUILD SUCCESSFUL in 970ms
13 actionable tasks: 4 executed, 9 up-to-date

Publish
[dave@dave gradle-demo]$ ./gradlew build --scan

BUILD SUCCESSFUL in 4s
13 actionable tasks: 13 up-to-date

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes

Gradle Terms of Service accepted.

Publishing build scan...
https://gradle.com/s/v7pfqpbcuendg

Monday, April 5, 2021

LDAP search

HOWTO

 

LDAP test server

LDAP Server Information (read-only access):

Server: ldap.forumsys.com  
Port: 389

Bind DN: cn=read-only-admin,dc=example,dc=com
Bind Password: password

All user passwords are password.

 

 Search using test  server

[dave@dave git]$ ldapsearch -W -h ldap.forumsys.com -D "cn=read-only-admin,dc=example,dc=com" -b "dc=example,dc=com"  "uid=Newton" 
Enter LDAP Password: 
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: uid=Newton
# requesting: ALL
#

# newton, example.com
dn: uid=newton,dc=example,dc=com
sn: Newton
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
uid: newton
mail: newton@ldap.forumsys.com
cn: Isaac Newton

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Select attributes
[dave@dave git]$ ldapsearch -W -h ldap.forumsys.com -D "cn=read-only-admin,dc=example,dc=com" -b "dc=example,dc=com"  "uid=Newton" mail
Enter LDAP Password: 
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: uid=Newton
# requesting: mail 
#

# newton, example.com
dn: uid=newton,dc=example,dc=com
mail: newton@ldap.forumsys.com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Search using Java https://github.com/dveselka/java-tutorial/blob/master/src/main/java/ldap/TestLDAP.java
package ldap;

import java.util.ArrayList;
import java.util.Properties;


import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.Attribute;
import javax.naming.Context;
import javax.naming.directory.InitialDirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;

public class TestLDAP {
    private static final String CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";

    private InitialDirContext ctx;
    private String basedn;
    private SearchControls ctrls;

    private TestLDAP(String url, String user, String password, String b) throws NamingException {
        ctx = TestLDAP.doConnect(url, user, password);
        basedn = b.length() > 0 ? "," + b : b;
        ctrls = new SearchControls();
    }

    public ArrayList<Attributes> search(String base, String filter) throws NamingException {
        NamingEnumeration<SearchResult> ne = ctx.search(base + basedn, filter, ctrls);
        ArrayList<Attributes> arr = new ArrayList<>();
        while (ne.hasMore()) {
            arr.add(ne.next().getAttributes());
        }
        return arr;
    }

    public Attributes get(String base) throws NamingException {
        return ctx.getAttributes(base + basedn);
    }

    private static InitialDirContext doConnect(String url, String user, String password) throws NamingException {
        Properties props = new Properties();
        props.put(Context.INITIAL_CONTEXT_FACTORY, CONTEXT_FACTORY);
        props.put(Context.PROVIDER_URL, url);
        props.put(Context.SECURITY_PRINCIPAL, user);
        props.put(Context.SECURITY_CREDENTIALS, password);

        return new InitialDirContext(props);
    }

    public static TestLDAP connect(String url, String user, String pass, String basedn) throws NamingException {
        return new TestLDAP(url, user, pass, basedn);
    }

    public static boolean testConnection(String url, String user, String password) {
        try {
            return TestLDAP.doConnect(url, user, password) != null;
        } catch (Exception e) {
            return false;
        }
    }

    public static void main(String[] args) {
        try {
            TestLDAP testLDAP = new TestLDAP("ldap://ldap.forumsys.com", "cn=read-only-admin,dc=example,dc=com",
                    "password", "dc=example,dc=com");
            Attributes attributes = testLDAP.get("uid=Newton");

            NamingEnumeration<? extends Attribute> allAttributes = attributes.getAll();
            while (allAttributes.hasMore()) {
                Attribute attribute = allAttributes.next();
                System.out.println(attribute.getID() + "=" + attribute.get().toString());
            }

        } catch (NamingException e) {
            e.printStackTrace();
        }
    }
}
Run code in Eclipse

Saturday, March 20, 2021

k8s minikube addons

 HOWTO

 

Get addons list
[dave@dave ~]$ minikube addons list
|-----------------------------|----------|--------------|
|         ADDON NAME          | PROFILE  |    STATUS    |
|-----------------------------|----------|--------------|
| ambassador                  | minikube | disabled     |
| auto-pause                  | minikube | disabled     |
| csi-hostpath-driver         | minikube | disabled     |
| dashboard                   | minikube | enabled ✅   |
| default-storageclass        | minikube | enabled ✅   |
| efk                         | minikube | disabled     |
| freshpod                    | minikube | disabled     |
| gcp-auth                    | minikube | disabled     |
| gvisor                      | minikube | disabled     |
| helm-tiller                 | minikube | disabled     |
| ingress                     | minikube | enabled ✅   |
| ingress-dns                 | minikube | disabled     |
| istio                       | minikube | disabled     |
| istio-provisioner           | minikube | disabled     |
| kubevirt                    | minikube | disabled     |
| logviewer                   | minikube | disabled     |
| metallb                     | minikube | disabled     |
| metrics-server              | minikube | disabled     |
| nvidia-driver-installer     | minikube | disabled     |
| nvidia-gpu-device-plugin    | minikube | disabled     |
| olm                         | minikube | disabled     |
| pod-security-policy         | minikube | disabled     |
| registry                    | minikube | disabled     |
| registry-aliases            | minikube | disabled     |
| registry-creds              | minikube | disabled     |
| storage-provisioner         | minikube | enabled ✅   |
| storage-provisioner-gluster | minikube | disabled     |
| volumesnapshots             | minikube | disabled     |
|-----------------------------|----------|--------------|

enable metrics
[dave@dave ~]$ minikube addons enable metrics-server
    ▪ Using image k8s.gcr.io/metrics-server-amd64:v0.2.1
🌟  The 'metrics-server' addon is enabled


get metrics
[dave@dave ~]$ kubectl get pod,svc -n kube-system
NAME                                            READY   STATUS      RESTARTS   AGE
pod/coredns-74ff55c5b-vkbhb                     1/1     Running     3          6d18h
pod/etcd-minikube                               1/1     Running     2          5d21h
pod/ingress-nginx-admission-create-mqrgx        0/1     Completed   0          5d12h
pod/ingress-nginx-admission-patch-5hsm2         0/1     Completed   0          5d12h
pod/ingress-nginx-controller-65cf89dc4f-64d9n   1/1     Running     4          5d12h
pod/kube-apiserver-minikube                     1/1     Running     2          5d21h
pod/kube-controller-manager-minikube            1/1     Running     3          6d18h
pod/kube-proxy-jfktf                            1/1     Running     3          6d18h
pod/kube-scheduler-minikube                     1/1     Running     3          6d18h
pod/metrics-server-56c4f8c9d6-q86vt             1/1     Running     0          10s
pod/storage-provisioner                         1/1     Running     7          6d18h

NAME                                         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
service/ingress-nginx-controller-admission   ClusterIP   10.108.226.190   <none>        443/TCP                  5d12h
service/kube-dns                             ClusterIP   10.96.0.10       <none>        53/UDP,53/TCP,9153/TCP   6d18h
service/metrics-server                       ClusterIP   10.103.175.49    <none>        443/TCP                  10s

 

Saturday, March 13, 2021

Upgrade minikube on Fedora 33

 Upgrade Docker, kubectl, minikube to latest version

Remove previous versions and start minikube

Installed versions 

 

[dave@dave ~]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
[dave@dave ~]$ docker version
Client: Docker Engine - Community
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:19:16 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:16:56 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
[dave@dave ~]$ which kubectl
/usr/local/bin/kubectl
[dave@dave ~]$ minikube version
minikube version: v1.18.1
commit: 09ee84d530de4a92f00f1c5dbc34cead092b95bc


 

Delete all previous versions to avoid errors on start

Exiting due to GUEST_START: wait 6m0s for node: wait for healthy API server: controlPlane never updated to v1.20.2



[dave@dave ~]$ rm -rf ~/.minikube/

dave@dave ~]$ minikube delete
🙄  "minikube" profile does not exist, trying anyways.
💀  Removed all traces of the "minikube" cluster.
[dave@dave ~]$ minikube start --driver=docker
😄  minikube v1.18.1 on Fedora 33
✨  Using the docker driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.20.2 preload ...
    > preloaded-images-k8s-v9-v1....: 491.22 MiB / 491.22 MiB  100.00% 10.37 Mi
🔥  Creating docker container (CPUs=2, Memory=3900MB) ...
❗  Unable to create dedicated network, this might result in cluster IP change after restart: failed to create network after 20 attempts
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.3 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v4
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default




Check minikube cluster

[dave@dave Downloads]$ kubectl cluster-info
Kubernetes master is running at https://172.17.0.3:8443
KubeDNS is running at https://172.17.0.3:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.


Sunday, February 21, 2021

JBoss Wildfly Kubernetes Operator

 HOWTO

 

GitHub repos


Build JBoss Wildfly Docker image GitHub repo https://github.com/dveselka/java-ee-8/tree/main/java-ee8-minimal Dockerfile
$ more Dockerfile
FROM jboss/wildfly

RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent

COPY ./target/java-ee8-minimal.war /opt/jboss/wildfly/standalone/deployments/

CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]

Build Docker image

mvn clean package && docker build -t dveselka/java-ee8-minimal .
....

Sending build context to Docker daemon  111.6kB
Step 1/4 : FROM jboss/wildfly
latest: Pulling from jboss/wildfly
75f829a71a1c: Pull complete 
7b11f246b3d3: Pull complete 
b765648c2a58: Pull complete 
506aff4a9c5a: Pull complete 
a7ae73eec52a: Pull complete 
Digest: sha256:c0be1b7462a7ee9d07be5e319f7f2b10a93e5b43d51532ed012d2869e0224cf0
Status: Downloaded newer image for jboss/wildfly:latest
 ---> 13b4b5beba73
Step 2/4 : RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#123 --silent
 ---> Running in ecb1651c51fc
Removing intermediate container ecb1651c51fc
 ---> 74f6e50296e9
Step 3/4 : COPY ./target/java-ee8-minimal.war /opt/jboss/wildfly/standalone/deployments/
 ---> dd07d8a883fc
Step 4/4 : CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
 ---> Running in d9575f15ea43
Removing intermediate container d9575f15ea43
 ---> 01e0043e9e6f
Successfully built 01e0043e9e6f
Successfully tagged dveselka/java-ee8-minimal:latest

Docker image
[dave@dave java-ee8-minimal]$ docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
dveselka/java-ee8-minimal       latest              01e0043e9e6f        3 minutes ago       714MB

Push Docker image to DockerHub
$ docker push   dveselka/java-ee8-minimal
The push refers to repository [docker.io/dveselka/java-ee8-minimal]
4a24521ab9d6: Pushed 
348cd5508b6f: Pushed 
9ef61a25476f: Mounted from jboss/wildfly 
869989761eb2: Mounted from jboss/wildfly 
3fbe1e874b0d: Mounted from jboss/wildfly 
115463be137a: Mounted from jboss/wildfly 
613be09ab3c0: Mounted from jboss/wildfly 
latest: digest: sha256:d416275117d084e0cf557f6cf1ad82dc0aba7bf67921e4f19703e9a48701b2ec size: 1790

Run in k8s
$ kubectl run java-ee8-minimal --image=dveselka/java-ee8-minimal
Get k8s pods
 kubectl get pods
NAME               READY   STATUS             RESTARTS   AGE
java-ee8-minimal   0/1     ImagePullBackOff   0          12s
Minikube running in Docker
$ docker ps
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS              PORTS                                                                                                                                  NAMES
5f6397acb7e1        gcr.io/k8s-minikube/kicbase:v0.0.18   "/usr/local/bin/entr…"   21 hours ago        Up 22 minutes       127.0.0.1:32772->22/tcp, 127.0.0.1:32771->2376/tcp, 127.0.0.1:32770->5000/tcp, 127.0.0.1:32769->8443/tcp, 127.0.0.1:32768->32443/tcp   minikube

Start k8s dashboard
$ kubectl cluster-info 
Kubernetes control plane is running at https://172.17.0.2:8443
KubeDNS is running at https://172.17.0.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
[dave@dave java-ee8-minimal]$ minikube dashboard
🔌  Enabling dashboard ...
    ▪ Using image kubernetesui/dashboard:v2.1.0
    ▪ Using image kubernetesui/metrics-scraper:v1.0.4
🤔  Verifying dashboard health ...
🚀  Launching proxy ...
🤔  Verifying proxy health ...
🎉  Opening http://127.0.0.1:43609/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser...

Forward k8s port to host
$ kubectl port-forward java-ee8-minimal 9990:9990
Forwarding from 127.0.0.1:9990 -> 9990
Forwarding from [::1]:9990 -> 9990
Handling connection for 9990

Check connection to app
$ wget http://localhost:8080/
--2021-03-14 17:28:48--  http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1504 (1.5K) [text/html]
Saving to: ‘index.html’

Call application resource
 curl http://localhost:8080/java-ee8-minimal/resources/ping
Enjoy Jakarta EE with MicroProfile 2+
Minikube dashboard with pod
Create deployment on k8s cluster
$ kubectl apply -f app.yml 
deployment.apps/java-ee8-minimal created
[dave@dave java-ee8-minimal]$ kubectl get pods
NAME                                READY   STATUS              RESTARTS   AGE
java-ee8-minimal-76cd57679d-l5smd   0/1     ContainerCreating   0          3s
java-ee8-minimal-76cd57679d-swvcd   0/1     ContainerCreating   0          3s

k8s deployment https://github.com/dveselka/java-ee-8/blob/main/java-ee8-minimal/app.yml
 more app.yml 
apiVersion: apps/v1
kind: Deployment
metadata:
  name: java-ee8-minimal
spec:
  selector:
    matchLabels:
      app: java-ee8
  replicas: 2 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: java-ee8
    spec:
      containers:
      - name: java-ee8-minimal
        image: dveselka/java-ee8-minimal
        ports:
        - containerPort: 8080

Check pods
[dave@dave java-ee8-minimal]$ kubectl get pods -l app=java-ee8 -o wide
NAME                                READY   STATUS    RESTARTS   AGE     IP           NODE       NOMINATED NODE   READINESS GATES
java-ee8-minimal-76cd57679d-l5smd   1/1     Running   0          3m35s   172.18.0.5   minikube   <none>           <none>
java-ee8-minimal-76cd57679d-swvcd   1/1     Running   0          3m35s   172.18.0.6   minikube   <none>           <none>

Export port - service https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/
dave@dave java-ee8-minimal]$ kubectl expose deployment/java-ee8-minimal
service/java-ee8-minimal exposed
[dave@dave java-ee8-minimal]$ curl 172.18.0.5:8080
curl: (7) Failed to connect to 172.18.0.5 port 8080: No route to host
[dave@dave java-ee8-minimal]$ kubectl get pods -l app=java-ee8 -o wide |grep podIP
[dave@dave java-ee8-minimal]$ kubectl get pods -l app=java-ee8 -o wide 
NAME                                READY   STATUS    RESTARTS   AGE     IP           NODE       NOMINATED NODE   READINESS GATES
java-ee8-minimal-76cd57679d-l5smd   1/1     Running   0          5m28s   172.18.0.5   minikube   <none>           <none>
java-ee8-minimal-76cd57679d-swvcd   1/1     Running   0          5m28s   172.18.0.6   minikube   <none>           <none>
[dave@dave java-ee8-minimal]$ kubectl get svc java-ee8-minimal
NAME               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
java-ee8-minimal   ClusterIP   10.103.186.17   <none>        8080/TCP   35s
[dave@dave java-ee8-minimal]$ kubectl get svc java-ee8-minimal
NAME               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
java-ee8-minimal   ClusterIP   10.103.186.17   <none>        8080/TCP   40s
[dave@dave java-ee8-minimal]$ kubectl get ep java-ee8-minimal
NAME               ENDPOINTS                         AGE
java-ee8-minimal   172.18.0.5:8080,172.18.0.6:8080   61s
[dave@dave java-ee8-minimal]$ curl 172.18.0.5:8080/java-ee8-minimal/resources/ping
curl: (7) Failed to connect to 172.18.0.5 port 8080: No route to host
[dave@dave java-ee8-minimal]$ kubectl exec my-nginx-3800858182-jr4a2 -- printenv | grep SERVICE^C
[dave@dave java-ee8-minimal]$ kubectl get pods
NAME                                READY   STATUS    RESTARTS   AGE
java-ee8-minimal-76cd57679d-l5smd   1/1     Running   0          7m18s
java-ee8-minimal-76cd57679d-swvcd   1/1     Running   0          7m18s
[dave@dave java-ee8-minimal]$ kubectl exec java-ee8-minimal-76cd57679d-l5smd -- printenv | grep SERVICE
KUBERNETES_SERVICE_PORT=443
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_HOST=10.96.0.1
[dave@dave java-ee8-minimal]$ kubectl get services kube-dns --namespace=kube-system
NAME       TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)                  AGE
kube-dns   ClusterIP   10.96.0.10   <none>        53/UDP,53/TCP,9153/TCP   26h
[dave@dave java-ee8-minimal]$ kubectl run curl --image=radial/busyboxplus:curl -i --tty
If you don't see a command prompt, try pressing enter.
[ root@curl:/ ]$ nslookup  java-ee8-minimal
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

nslookup: can't resolve 'java-ee8-minimal'
[ root@curl:/ ]$ curl 172.18.0.5:8080/java-ee8-minimal/resources/ping

Add ingress https://kubernetes.io/docs/concepts/services-networking/ingress/ https://github.com/dveselka/java-ee-8/blob/main/java-ee8-minimal/ingress.yaml
$ kubectl apply -f ingress.yaml 
ingress.networking.k8s.io/java-ee8-ingress configured
[dave@dave java-ee8-minimal]$ kubectl describe ingress  java-ee8-ingress
Name:             java-ee8-ingress
Namespace:        default
Address:          
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           
              /java-ee8-minimal   java-ee8-minimal:8080 (172.18.0.5:8080,172.18.0.6:8080)
Annotations:  nginx.ingress.kubernetes.io/rewrite-target: /
Events:       <none>

SSH into container inside k8s cluster

[dave@dave java-ee8-minimal]$ kubectl get pods
NAME                                READY   STATUS    RESTARTS   AGE
curl                                1/1     Running   1          3h49m
java-ee8-minimal-76cd57679d-l5smd   1/1     Running   0          3h58m
java-ee8-minimal-76cd57679d-swvcd   1/1     Running   0          3h58m
[dave@dave java-ee8-minimal]$ kubectl exec --stdin --tty java-ee8-minimal-76cd57679d-l5smd  -- /bin/bash
[jboss@java-ee8-minimal-76cd57679d-l5smd ~]$ curl localhost:8080/java-ee8-minimal/resources/ping
Enjoy Jakarta EE with MicroProfile 2+!
Add JBOss Wildfly admin user
[jboss@java-ee8-minimal-76cd57679d-l5smd ~]$ cd wildfly/
[jboss@java-ee8-minimal-76cd57679d-l5smd wildfly]$ ls
LICENSE.txt  README.txt  appclient  bin  copyright.txt  docs  domain  jboss-modules.jar  modules  standalone  welcome-content
[jboss@java-ee8-minimal-76cd57679d-l5smd wildfly]$ cd bin
[jboss@java-ee8-minimal-76cd57679d-l5smd bin]$ ./add-user.sh

What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
(a): 

Access Wildfly admin console Forward admin port
$ kubectl port-forward  java-ee8-minimal-76cd57679d-l5smd 9990:9990
Forwarding from 127.0.0.1:9990 -> 9990
Forwarding from [::1]:9990 -> 9990
Handling connection for 9990

Access console via browser using
http://localhost:9990/console
Access JBoss using minikube service
$ minikube service java-ee8-service
|-----------|------------------|-------------|-------------------------|
| NAMESPACE |       NAME       | TARGET PORT |           URL           |
|-----------|------------------|-------------|-------------------------|
| default   | java-ee8-service |        8080 | http://172.17.0.2:30919 |
|-----------|------------------|-------------|-------------------------|
🎉  Opening service default/java-ee8-service in default browser...

Instance running at http://172.17.0.2:30919/
$ wget -O - http://172.17.0.2:30919 
--2021-03-20 09:33:06--  http://172.17.0.2:30919/
Connecting to 172.17.0.2:30919... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1504 (1.5K) [text/html]
Saving to: ‘STDOUT’

-                                         0%[                                                                                ]       0  --.-KB/s               <!DOCTYPE html>

<html>
<head>
    <!-- proper charset -->
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

    <title>Welcome to WildFly</title>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="StyleSheet" href="wildfly.css" type="text/css">
</head>

<body>
<div class="wrapper">
    <div class="content">
        <div class="logo">
                <img src="wildfly_logo.png" alt="WildFly" border="0" />
        </div>
        <h1>Welcome to WildFly</h1>

        <h3>Your WildFly instance is running.</h3>

        <p><a href="https://docs.wildfly.org">Documentation</a> | <a href="https://github.com/wildfly/quickstart">Quickstarts</a> | <a href="/console">Administration
            Console</a> </p>

        <p><a href="https://wildfly.org">WildFly Project</a> |
            <a href="https://community.jboss.org/en/wildfly">User Forum</a> |
            <a href="https://issues.jboss.org/browse/WFLY">Report an issue</a></p>
        <p class="logos"><a href="https://www.jboss.org"><img src="jbosscommunity_logo_hori_white.png" alt="JBoss and JBoss Community" width=
                "195" height="37" border="0"></a></p>

        <p class="note">To replace this page simply deploy your own war with / as its context path.<br />
            To disable it, remove the "welcome-content" handler for location / in the undertow subsystem.</p>
    </div>
</div>
</body>
</html>
-                                       100%[===============================================================================>]   1.47K  --.-KB/s    in 0s      

2021-03-20 09:33:06 (36.7 MB/s) - written to stdout [1504/1504]

Weblogic Kubernetes Operator

HOWTO

 

GitHub repos

See latest updates here https://danielveselka.blogspot.com/2023/11/weblogic-kubernetes-k8s-operator.html