# How to create an Angus environment

# Preparing Kubernetes Cluster

If using Minikube follow these steps to expose the necessary components for external access:

  1. Start Minikube: If you didn't do it before:
    minikube start
  2. Enable Ingress: Run the following command to enable the ingress addon in Minikube:
    minikube addons enable ingress
  3. Retrieve Minikube’s IP Address: Check the cluster’s IP address using:
    minikube ip
  4. Extend /etc/hosts file: Add this line to the end of it by using the previously obtained IP address (it may vary):
    plaintext
    192.168.49.2	angus-server.local angus-gateway.local
    

If using a remote cluster ensure that the Kubernetes cluster is accessible and that the necessary components are exposed for external access.

# Registering as a New User

Before accessing Angus, you need to register and set up the command-line tools:

  1. Create an Angus account: Visit the Angus Center Console: https://app.angusnext.io and register a new account.

  2. Initialize Angusctl: Set up your environment:

    angusctl init
  3. Login: Log into Angus Center using your registered username and password:

    angusctl center login
  4. Register User and Organization: Add your user and organization information:

    angusctl cluster register
    
    

# Initializing the Cluster

Ensure your Kubernetes cluster is accessible and ready for Angus deployment.

  1. Verify Cluster Access: Confirm access with:
    angusctl cluster info
  2. Cluster Initialization: Initialize the cluster:
    angusctl cluster init
  3. Deploy Angus Integration: Follow the on-screen instructions to deploy the Angus integration components.

# Creating and Running a New Chaincode Project

Once the setup is complete, you can create and deploy a new chaincode project.

  1. Create a Project: Use the following command to create a new chaincode project named example:
    angusctl devstack create --name example
  2. Deploy Chaincode: Navigate to the project directory and deploy it using Skaffold:
    cd example
    skaffold run
  3. Verify Deployment: Use k9s or any Kubernetes dashboard to monitor the deployment. The environment is ready when the Chaincode resource shows a Ready state.
  4. Test the Setup: Check the health of your deployment with:
    curl -s http://angus-gateway.local/maintenance/healthcheck -H "X-angus-userid: developer"