Skip to content

This repository contains infrastructure setup details for local environment and Terraform IAC for demo projects created in this GitHub org.

Notifications You must be signed in to change notification settings

Microservices-Demo-Projects/infra-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

infra-setup

This repository contains infrastructure setup details for Kubernetes and OpenShift clusters in local environments, as well as Terraform Infrastructure as Code (IaC) for AWS-based demo projects within this GitHub organization.

Prerequisites

Local Development

Choose one of the following options for local cluster setup:

Cloud Managed Environments

  • AWS EKS: This repository includes a fully documented Infrastructure as Code implementation in the eks-iac directory, covering everything needed for your EKS deployment.

  • Other Cloud Platforms: You can also use GKE, AKS, ROSA, or ARO to run all demo and POC applications in this GitHub organization. For cluster setup instructions, please refer to the respective cloud provider's official documentation.

Required Tools

  • Terraform: For Infrastructure as Code (IaC) provisioning
  • CLI Tools:
    • kubectl (Kubernetes CLI) or oc (OpenShift CLI)
    • aws (AWS CLI) - for AWS deployments

Local OpenShift Cluster Setup - CodeReady Container

  • Prerequisites: First, ensure your system meets the requirements:

    • RAM: Minimum 9 GB (16 GB recommended)
    • CPU: 4 physical CPU cores
    • Disk space: 35 GB free space
    • Operating System: Windows, macOS, or Linux
  • Download and Install CRC

  • Create and configure new local OpenShift cluster by running:

    [!NOTE] Login and download the pull-secret.txt file from https://console.redhat.com/openshift/create/local

    # One-time setup (first time or after upgrade)
    crc setup
    
    # Download pull secret from console.redhat.com and save it or you can also provide this file path later when `crc start` command prompts for it.
    crc config set pull-secret-file /path/to/pull-secret.txt
    
    # Option Resource Configs
    ## Set custom CPU cores (default is 4)
    crc config set cpus 10
    
    ## Set custom memory in MB (default is 10752)
    crc config set memory 49152
    
    ## Set disk size in GB (default is 31)
    crc config set disk-size 120
    
    ## Set user defined kubeadmin password 
    crc config set kubeadmin-password Admin@123 #Note, change this example password.
    
    ## Set user defined developer password
    crc config set developer-password Dev@123 #Note, change this example password.
    
    ## Verify or to set other properties
    crc config view
    crc config --help
    
    
    # Start existing or create new cluster:
    crc start
    
    # Set up the oc command in your shell
    eval $(crc oc-env)
  • Use the following command to manage the code ready container - OpenShift cluster for local development.

    ###############################
    # Useful Management Commands
    ###############################
    ## Check cluster status
    crc status
    
    ## Stop the cluster
    crc stop
    
    ## Delete the cluster
    crc delete
    
    ## Start existing or create new cluster:
    crc start
    
    # Set up the oc command in your shell
    eval $(crc oc-env)
    
    ## View cluster info
    crc console --credentials
    
    # Open the console in browser
    crc console
    
    ## View current configuration
    crc config view
    
    # Login as admin
    oc login -u kubeadmin https://api.crc.testing:6443
    # Enter the password displayed after 'crc start' or `crc console --credentials`
    
    # Or login as developer
    oc login -u developer https://api.crc.testing:6443

About

This repository contains infrastructure setup details for local environment and Terraform IAC for demo projects created in this GitHub org.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published