constants

package
v0.0.0-...-0ba9b0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL_HOST_URL                           = "http://localhost"
	LOCALHOST                                = "127.0.0.1"
	CONTENT_TYPE                             = "Content-Type"
	TYPE_JSON                                = "application/json"
	HARDWARE_RESOURCE_CHECK_API_PATH         = "/api/v1/checks/hardware-resource-count"
	NFS_MOUNT_API_PATH                       = "/api/v1/checks/nfs-mount"
	NFS_MOUNT_LOC_API_PATH                   = "/api/v1/fetch/nfs-mount-loc"
	SOFTWARE_VERSION_CHECK_API_PATH          = "/api/v1/checks/software-versions"
	SYSTEM_RESOURCE_CHECK_API_PATH           = "/api/v1/checks/system-resource"
	SYSTEM_USER_CHECK_API_PATH               = "/api/v1/checks/system-user"
	FIREWALL_API_PATH                        = "/api/v1/checks/firewall"
	SSH_USER_CHECK_API_PATH                  = "/api/v1/checks/ssh-users"
	CERTIFICATE_CHECK_API_PATH               = "/api/v1/checks/certificate"
	S3_BACKUP_CHECK_API_PATH                 = "/api/v1/checks/s3-config"
	FQDN_LOAD_BALANCER_CHECK                 = "/api/v1/checks/fqdn"
	AWS_OPENSEARCH_S3_BUCKET_ACCESS_API_PATH = "/api/v1/checks/aws-opensearch-s3-bucket-access"
	PORT_REACHABLE_API_PATH                  = "/api/v1/checks/port-reachable"
	EXTERNAL_OPENSEARCH_API_PATH             = "/api/v1/checks/external-opensearch"
	EXTERNAL_POSTGRESQL_API_PATH             = "/api/v1/checks/external-postgresql"
	GCP_CLOUD_STORAGE_CONFIG_API_PATH        = "/api/v1/checks/gcp-cloud-storage-config"
	STATUS_API_PATH                          = "/status"
	START_MOCK_SERVER                        = "/api/v1/start/mock-server"
	STOP_MOCK_SERVER                         = "/api/v1/stop/mock-server"
	UNKNOWN_HOST                             = "unknown-host"
)
View Source
const (
	CERTIFICATE_EXPIRY_TITLE                 = "Certificates have valid expiry date"
	CERTIFICATE_VALID                        = "Certificates are valid"
	CERTIFICATE_EXPIRY_SUCCESS_MESSAGE       = "All certificates expiry date is later than 30 days"
	CERTIFICATE_EXPIRY_ERROR_MESSAGE         = "The %v certificates have expired"
	CERTIFICATE_EXPIRY_RESOLUTION_MESSAGE    = "Generate and provide certificates with expiry date later than 30 days"
	CERTIFICATE_FORMAT_TITLE                 = "Certificates are of X509 V3 format"
	CERTIFICATE_FORMAT_SUCCESS_MESSAGE       = "All certificates are of X509 V3 format"
	CERTIFICATE_FORMAT_ERROR_MESSAGE         = "The %v certificates are not of X509 V3 format"
	CERTIFICATE_FORMAT_RESOLUTION_MESSAGE    = "Generate and provide certificates of X509 v3 format"
	CERTIFICATE_ALGORITHM_TITLE              = "Certificates are hashed using either of PBE-SHA1-3DES, RSA (2048), SHA-256 algorithms"
	CERTIFICATE_ALGORITHM_SUCCESS_MESSAGE    = "All certificates are hashed using either of PBE-SHA1-3DES, RSA (2048), SHA-256 algorithms"
	CERTIFICATE_ALGORITHM_ERROR_MESSAGE      = "The %v certificate(s) are hashed using neither of the supported PBE-SHA1-3DES, RSA (2048), SHA-256 algorithms"
	CERTIFICATE_ALGORITHM_RESOLUTION_MESSAGE = "Generate and provide %v certificate(s) hashed using either of the the supported PBE-SHA1-3DES, RSA (2048), SHA-256 algorithms"
	KEY_FORMAT_TITLE                         = "Private Keys are of PKCS8 format"
	KEY_FORMAT_SUCCESS_MESSAGE               = "The private keys are of PKCS8 format"
	KEY_FORMAT_ERROR_MESSAGE                 = "The %v private key(s) are not of PKCS8 format"
	KEY_FORMAT_RESOLUTION_MESSAGE            = "Generate and provide %v private key of PKCS8 format"
	CERTIFICATE_BLOCK_TYPE                   = "CERTIFICATE"
	X509_VERSION                             = 3
	ROOT                                     = "Root"
	NODE                                     = "Node"
	ADMIN                                    = "Admin"
	NODE_KEY                                 = "Node-Key"
	ADMIN_KEY                                = "Admin-Key"
	CERTIFICATE_WILL_EXPIRE_IN_N_DAYS        = "Certificate will expire in %v days"
	RENEW_CERTS                              = "" /* 136-byte string literal not displayed */
	CERTS_EXPIRING_SOON                      = "Please update the certificates"
)
View Source
const (
	HARDWARE_RESOURCE_COUNT_MSG         = "Hardware Resource Count Check"
	CERTIFICATE_MSG                     = "Certificate Check"
	SSH_USER_MSG                        = "SSH User Access Check"
	SYSTEM_RESOURCES_MSG                = "System Resources Check"
	SOFTWARE_VERSIONS_MSG               = "Software Versions Check"
	SYSTEM_USER_MSG                     = "System User Check"
	S3_BACKUP_CONFIG_MSG                = "S3 Backup Config Check"
	GCP_BACKUP_CONFIG_MSG               = "GCP Backup Config Check"
	FQDN_MSG                            = "FQDN Check"
	FIREWALL_MSG                        = "Firewall Check"
	EXTERNAL_OPENSEARCH_MSG             = "External OpenSearch Check"
	AWS_OPENSEARCH_S3_BUCKET_ACCESS_MSG = "AWS Opensearch S3 Bucket Access Check"
	EXTERNAL_POSTGRESQL_MSG             = "External PostgreSQL Check"
	NFS_BACKUP_CONFIG_MSG               = "NFS Backup Config Check"
)
View Source
const (
	BASTION_CHECK = "bastion"
	REMOTE_CHECK  = "remote"
)
View Source
const (
	AUTOMATESTATUSCMD = "chef-automate status"
	HABSTATUSCMD      = "HAB_LICENSE=accept-no-persist hab svc status"
)
View Source
const (
	PRE_DEPLOY  = "pre-deploy"
	POST_DEPLOY = "post-deploy"
)
View Source
const (
	AUTOMATESTATUSONBEERROR      = "" /* 229-byte string literal not displayed */
	AUTOMATESTATUSUNHEALTHYERROR = "UnhealthyStatusError: System status is unhealthy: One or more services are unhealthy"

	NODES_NOT_PRESENT      = "HA nodes are not available"
	MISSING_CERTIFICATE    = "Certificate is missing"
	MOUNT_LOCATION_MISSING = "MountLocation is missing"
	S3_BACKUP_MISSING      = "S3 backup detail is missing"
	GCS_BACKUP_MISSING     = "GCS backup detail is missing"
	OBJECT_STORAGE_MISSING = "Object storage detail or OS detail is missing"
	PG_DETAILS_MISSING     = "PG configuration is missing"
	OS_DETAILS_MISSING     = "OS configuration is missing"
)
View Source
const (
	EXTERNAL_OPENSEARCH_SUCCESS_TITLE  = "Connection successfully tested"
	EXTERNAL_OPENSEARCH_FAILED_TITLE   = "OpenSearch connection failed"
	EXTERNAL_OPENSEARCH_SUCCESS_MSG    = "Machine is able to connect with External Managed OpenSearch"
	EXTERNAL_OPENSEARCH_ERROR_MSG      = "Machine is unable to connect with External Managed OpenSearch"
	EXTERNAL_OPENSEARCH_RESOLUTION_MSG = "" /* 134-byte string literal not displayed */
	STATUS_PASS                        = "PASS"
	STATUS_FAIL                        = "FAIL"
)
View Source
const (
	EXTERNAL_PG_SUCCESS_CONNECTION_TITLE  = "Machine is able to connect with external managed PostgreSQL"
	EXTERNAL_PG_FAIL_CONNECTION_TITLE     = "External PostgreSQL connection failed"
	EXTERNAL_PG_CONNECTION_ERROR_MSG      = "Machine is unable to connect with external managed PostgreSQL"
	EXTERNAL_PG_CONNECTION_RESOLUTION_MSG = "" /* 134-byte string literal not displayed */
	EXTERNAL_PG_CONNECTION_SUCCESS_MSG    = "Connection successfully tested"
)
View Source
const (
	FQDN_TITLE                           = "FQDN is reachable"
	FQDN_ERROR_MESSAGE                   = "FQDN is not reachable"
	FQDN_RESOLUTION_MESSAGE              = "" /* 195-byte string literal not displayed */
	CERT_CN_MISMATCH_RESOLUTION_MESSAGE  = "" /* 160-byte string literal not displayed */
	CERT_CN_MISMATCH_ERROR_PATTERN       = "x509: certificate is not valid for any names, but wanted to match"
	INVALID_FQDN_CERT_RESOLUTION_MESSAGE = "" /* 153-byte string literal not displayed */
	INVALID_FQDN_CERT_ERROR_PATTERN      = "x509: certificate signed by unknown authority"
	GENERIC_FQDN_CERT_RESOLUTION_MESSAGE = "" /* 172-byte string literal not displayed */
	NODE_TITLE                           = "Nodes are reachable"
	NODE_SUCCESS_MESSAGE                 = "All nodes are reachable"
	NODE_ERROR_MESSAGE                   = "%v is not reachable"
	NODE_RESOLUTION_MESSAGE              = "Ensure your Port 443 is open. Review security group or firewall settings of the node."
	CERTIFICATE_TITLE                    = "Certificate validity for FQDN"
	CERTIFICATE_SUCCESS_MESSAGE          = "FQDN has with valid certificates"
	CERTIFICATE_ERROR_MESSAGE            = "FQDN certificate is not valid."
	CERTIFICATE_RESOLUTION_MESSAGE       = "Generate new valid certificates and provide those."
	IP_TO_HASH_FAIL_MESSAGE              = "Failed to hash the IP."
	DEFAULT_HTTPS_PORT                   = "443"
	SERVER_IP_HEADER_KEY                 = "x-server-ip"
	CHAN_RESULT_ERROR_MESSAGE            = "error recieved"
	MIN_NUMBER_OF_CALLS                  = 50
)
View Source
const (
	GCP_CONNECTION_TITLE                  = "GCS connection test"
	GCP_BUCKET_NOT_FOUND                  = "Cannot find the Bucket in GCS cloud storage with provided credentials"
	GCP_BUCKET_NOT_FOUND_RESOLUTION_MSG   = "Create a bucket in GCS cloud storage"
	GCP_CONNECTION_ERROR_MSG              = "Machine is not able to connect with GCS using the provided credentials"
	GCP_CONNECTION_RESOLUTION_MSG         = "Provide the correct GCS credentials"
	GCP_CONNECTION_SUCCESS_MSG            = "Machine is able to connect with GCS using the provided credentials"
	GCP_CONNECTION_RESOLUTION_GENERAL_MSG = "Machine is not able to connect, check if the bucket exists and the provided credential is correct"
	GCP_BUCKET_ACCESS_TITLE               = "GCS bucket access test"
	GCP_BUCKET_ACCESS_ERROR_MSG           = "Machine is not able to access the GCS bucket using the provided credentials"
	GCP_BUCKET_ACCESS_RESOLUTION_MSG      = "Please check if the provided GCS bucket exists or not. If it exists then provide the correct credentials."
	GCP_BUCKET_UPLOAD_ERROR_MSG           = "Unable to upload the object to given bucket"
	GCP_BUCKET_UPLOAD_RESOLUTION_MSG      = "Please check if the valid permissions given to upload the object to the bucket"
	GCP_BUCKET_LIST_ERROR_MSG             = "Unable to list the objects in given bucket"
	GCP_BUCKET_LIST_RESOLUTION_MSG        = "Please check if the valid permissions given to list the objects in the bucket"
	GCP_BUCKET_DELETE_ERROR_MSG           = "Unable to delete the object from the given bucket"
	GCP_BUCKET_DELETE_RESOLUTION_MSG      = "Please check if the valid permissions given to delete the object in the bucket"

	GCP_CHECK_FILE_PREFIX = "gcp_check_test_"
)
View Source
const (
	GCS_TYPE_MISSING                = "'type' field is missing in gcs service account file"
	GCS_PROJECT_ID                  = "'project_id' field is missing in gcs service account file"
	GCS_PRIVATE_KEY_ID              = "'private_key_id' field is missing in gcs service account file"
	GCS_PRIVATE_KEY                 = "'private_key' field is missing in gcs service account file"
	GCS_CLIENT_EMAIL                = "'client_email' field is missing in gcs service account file"
	GCS_CLIENT_ID                   = "'client_id' field is missing in gcs service account file"
	GCS_AUTH_URI                    = "'auth_uri' field is missing in gcs service account file"
	GCS_TOKEN_URI                   = "'token_uri' field is missing in gcs service account file"
	GCS_AUTH_PROVIDER_x509_CERT_URL = "'auth_provider_x509_cert_url' field is missing in gcs service account file"
	GCS_CLIENT_x509_CERT_URL        = "'client_x509_cert_url' field is missing in gcs service account file"
	GCS_UNIVERSAL_DOMAIN            = "'universe_domain' field is missing in gcs service account file"

	// Resolutions
	GCS_TYPE_MISSING_RESOLUTION                = "Provide 'type' in gcs service account file"
	GCS_PROJECT_ID_RESOLUTION                  = "Provide 'project_id' in gcs service account file"
	GCS_PRIVATE_KEY_ID_RESOLUTION              = "Provide 'private_key_id' in gcs service account file"
	GCS_PRIVATE_KEY_RESOLUTION                 = "Provide 'private_key' in gcs service account file"
	GCS_CLIENT_EMAIL_RESOLUTION                = "Provide 'client_email' in gcs service account file"
	GCS_CLIENT_ID_RESOLUTION                   = "Provide 'client_id' in gcs service account file"
	GCS_AUTH_URI_RESOLUTION                    = "Provide 'auth_uri' in gcs service account file"
	GCS_TOKEN_URI_RESOLUTION                   = "Provide 'token_uri' in gcs service account file"
	GCS_AUTH_PROVIDER_x509_CERT_URL_RESOLUTION = "Provide 'auth_provider_x509_cert_url' in gcs service account file"
	GCS_CLIENT_x509_CERT_URL_RESOLUTION        = "Provide 'client_x509_cert_url' in gcs service account file"
	GCS_UNIVERSAL_DOMAIN_RESOLUTION            = "Provide 'universe_domain' in gcs service account file"
)
View Source
const (
	INSTANCE_COUNT                     = "Instance count"
	IP_ADDRESS                         = "IP address"
	BACKEND_CLUSTER                    = "backend"
	FRONTEND_CLUSTER                   = "frontend"
	UNIQUE_SUCCESS_MESSAGE             = "IP address is unique"
	UNIQUE_ERROR_MESSAGE               = "IP address is not unique"
	UNIQUE_RESOLUTION_MESSAGE          = "IP address for %s type should be unique."
	VALID_COUNT_SUCCESS_MESSAGE        = "%s type has valid count as per Automate HA requirement"
	VALID_COUNT_ERROR_MESSAGE          = "%s type has invalid count as per Automate HA requirement"
	VALID_COUNT_RESOLUTION_MESSAGE     = "Hardware Resource Count for %s type should be according to Automate HA requirements."
	VALID_FORMAT_SUCCESS_MESSAGE       = "IP address is of valid format"
	VALID_FORMAT_ERROR_MESSAGE         = "IP address is of invalid format"
	VALID_COUNT_IPS_SUCCESS_MESSAGE    = "Number of IP Addresses are matched with the instance count"
	VALID_COUNT_IPS_ERROR_MESSAGE      = "Number of IP Addresses are not-matched with the instance count"
	VALID_COUNT_IPS_RESOLUTION_MESSAGE = "Number of Ip Addresses should match with the instance count"
	VALID_FORMAT_RESOLUTION_MESSAGE    = "IP address %s should be changed in config to valid format."
	SHARED_SUCCESS_MESSAGE             = "Not shared with %s nodes"
	SHARED_ERROR_MESSAGE               = "IP address is common in %s type and %s type"
	SHARED_RESOLUTION_MESSAGE          = "Unique IP address should be used for %s type and %s type"
	MIN_AUTOMATE_REQ                   = 1
	MIN_CHEF_INFRA_SERVER_REQ          = 1
	MIN_POSTGRESQL_REQ                 = 3
	MIN_OPENSEARCH_REQ                 = 3
)
View Source
const (
	TCP   = "tcp"
	UDP   = "udp"
	HTTP  = "http"
	HTTPS = "https"
)
View Source
const (
	NFS_MOUNT = "NFS Mount"

	MOUNT_SUCCESS_MSG    = "NFS mount location found"
	MOUNT_ERROR_MSG      = "NFS mount location not found"
	MOUNT_RESOLUTION_MSG = "NFS volume should be mounted on %s"

	SHARE_SUCCESS_MSG                  = "NFS mount location is shared across given nodes"
	SHARE_ERROR_MSG                    = "NFS mount location %s is not shared across all given nodes"
	SHARE_ERROR_MSG_WITHOUT_MOUNT      = "No NFS Volume found at mount location: %s"
	SHARE_RESOLUTION_MSG               = "NFS volume %s should be common across all given nodes at mount location: %s"
	SHARE_RESOLUTION_MSG_WITHOUT_MOUNT = "NFS volume should be mounted and common across all given nodes at mount location: %s"

	TIMEOUT = 30
)
View Source
const (
	AUTOMATE          = "automate"
	CHEF_INFRA_SERVER = "chef-infra-server"
	POSTGRESQL        = "postgresql"
	OPENSEARCH        = "opensearch"
	BASTION           = "bastion"
)
View Source
const (
	TEST_REPO_NAME                         = "S3BackupVerifyNew"
	TEST_SNAPSHOT_NAME                     = "test-snapshot-managed"
	TEST_INDEX_NAME                        = "test-index-managed"
	INDEX_CREATE_FAILED_MESSAGE            = "Failed to create an index on the Opensearch Domain"
	INDEX_CREATE_FAILED_RESOLUTION         = "Setup Opensearch with valid Configuration and provide the IAM user proper permissions to create an index."
	SNAPSHOT_REPO_CREATE_FAILED_MESSAGE    = "Failed to create the Snapshot Repository on the Opensearch Domain"
	SNAPSHOT_REPO_CREATE_FAILED_RESOLUTION = "Setup Opensearch with valid Configuration and provide the IAM user proper permissions to create the Snapsshot Repository."
	SNAPSHOT_CREATE_FAILED_MESSAGE         = "Failed to create the Snapshot on the Opensearch Domain"
	SNAPSHOT_CREATE_FAILED_RSOLUTION       = "Setup Opensearch with valid Configuration and provide the IAM user proper permissions to create a Snapshot."
	INDEX_DELETE_FAILED_MESSAGE            = "Failed to delete an index on the Opensearch Domain"
	INDEX_DELETE_FAILED_RESOLUTION         = "Provide the IAM user proper permissions to delete an index."
	SNAPSHOT_REPO_DELETE_FAILED_MESSAGE    = "Failed to delete the Snapshot Repository on the Opensearch Domain"
	SNAPSHOT_REPO_DELETE_FAILED_RESOLUTION = "Provide the IAM user proper permissions to delete the Snapshot Repository."
	SNAPSHOT_DELETE_FAILED_MESSAGE         = "Failed to delete the Snapshot on the Opensearch Domain"
	SNAPSHOT_DELETE_FAILED_RESOLUTION      = "Provide the IAM user proper permissions to delete the Snapshot."
	SNAPSHOT_STATUS_API                    = "/_snapshot/%s/%s/_status"
	INVALID_REQUEST_ERROR                  = "Invalid request body for S3 backup check"
)
View Source
const (
	PORT_REACHABLE = "Check for reachability of service at destination port"

	PORT_REACHABLE_SUCCESS_MSG    = "The %s service running at %s:%d is reachable"
	PORT_REACHABLE_ERROR_MSG      = "The %s service running at %s:%d is not reachable"
	PORT_REACHABLE_RESOLUTION_MSG = "Check your firewall settings and provide access to port %d on %s"
)
View Source
const (
	S3_CONNECTION_TITLE             = "S3 connection test"
	S3_CONNECTION_ERROR_MSG         = "Machine is not able to connect with S3 using the provided access key and secret key"
	S3_CONNECTION_RESOLUTION_MSG    = "Provide the correct S3 url or access or secret keys"
	S3_CONNECTION_SUCCESS_MSG       = "Machine is able to connect with S3 using the provided access key and secret key"
	S3_BUCKET_ACCESS_TITLE          = "S3 bucket access test"
	S3_BUCKET_ACCESS_ERROR_MSG      = "Machine is not able to access the S3 bucket using the provided access key and secret key"
	S3_BUCKET_ACCESS_RESOLUTION_MSG = "Please check if the provided S3 bucket exists or not. If it exists then provide the bucket access to the snapshot user."
	S3_BUCKET_ACCESS_SUCCESS_MSG    = "Machine is able to access the S3 bucket using the provided access key and secret key"
)
View Source
const (
	SKIP_CERT_TEST_MESSAGE                   = "- No Custom certificates provided\n- Using Default certificates"
	SKIP_CS_FQDN_TEST_MESSAGE                = "- FQDN and LoadBalancer Root CA missing"
	SKIP_MANAGED_OS_TEST_MESSAGE             = "- No External OpenSearch configuration found\n- Using Chef Managed OpenSearch"
	SKIP_MANAGED_PG_TEST_MESSAGE             = "- No External OpenSearch configuration found\n- Using Chef Managed PostgreSQL"
	SKIP_BACKUP_TEST_MESSAGE_NFS             = "- Backup configuration not set to file_system/efs"
	SKIP_BACKUP_TEST_MESSAGE_S3              = "- Backup configuration not set to object_storage/s3"
	SKIP_BACKUP_TEST_MESSAGE_GCS             = "- Backup configuration not set to object_storage/gcs"
	SKIP_OS_BUCKET_TEST_MESSAGE              = "- No External OpenSearch configuration provided or,\n- No S3 Backup configuration was provided"
	SKIP_OS_BUCKET_TEST_SELF_MANAGED_MESSAGE = "- External OpenSearch is self managed"
	SKIP_MISSING_HARDWARE_MESSAGE            = "- Instance count and Instance IPs are missing"
	SKIP_SSH_USER_TEST_MESSAGE               = "- SSH credentials are missing"
)
View Source
const (
	SUDO_PASSWORD_CMD                           = `echo "%s" | sudo -S ls -l`
	PEM_FILE_NAME                               = "private_key.pem"
	SSH_USER_SUCCESS_TITLE                      = "SSH user accessible"
	SSH_USER_SUCCESS_MESSAGE                    = "SSH user is accessible for the node: "
	SUDO_PASSWORD_TITLE                         = "Sudo password valid"
	SUDO_PASSWORD_SUCCESS_MESSAGE               = "SSH user sudo password is valid for the node: "
	SSH_USER_FAILURE_TITLE                      = "SSH user unaccessible"
	SSH_USER_ERROR_MESSAGE                      = "SSH user is unaccessible for the node with IP: "
	SSH_USER_RESOLUTION_MESSAGE                 = "Give SSH access to the user with the given key on the node: "
	SUDO_PASSWORD_FAILURE_TITLE                 = "Sudo password invalid"
	SUDO_PASSWORD_ERROR_MESSAGE                 = "SSH user sudo password is invalid for the node with IP: "
	SUDO_PASSWORD_FAILURE_RESOLUTION_MESSAGE    = "Ensure you have provided the correct sudo password and the user has sudo access on the node: "
	SUDO_PASSWORD_CONNECTION_ERROR_MESSAGE      = "SSH connection failed on the node so unable to check the sudo password for the node with IP: "
	SUDO_PASSWORD_CONNECTION_RESOLUTION_MESSAGE = "Ensure the correct credentials are provided for the SSH connection of node with IP: "
)
View Source
const (
	OK       = "OK"
	WARN     = "WARN"
	CRITICAL = "CRITICAL"
	UNKNOWN  = "UNKNOWN"
	UP       = "UP"
	DOWN     = "DOWN"
)
View Source
const (
	MIN_CPU_COUNT = 2
	MIN_CPU_SPEED = 2.0
	MIN_MEMORY    = 7

	HAB_FREE_DISK_BEFORE_DEP_A2      = 80
	HAB_FREE_DISK_BEFORE_DEP_CS      = 80
	HAB_FREE_DISK_BEFORE_DEP_PG      = 150
	HAB_FREE_DISK_BEFORE_DEP_OS      = 150
	HAB_FREE_DISK_BEFORE_DEP_BASTION = 150

	HAB_FREE_DISK_AFTER_DEP_A2      = 10
	HAB_FREE_DISK_AFTER_DEP_CS      = 10
	HAB_FREE_DISK_AFTER_DEP_PG      = 50
	HAB_FREE_DISK_AFTER_DEP_OS      = 50
	HAB_FREE_DISK_AFTER_DEP_BASTION = 30

	HAB_FREE_DISK_AFTER_DEP_A2_IN_PER      = 0.05
	HAB_FREE_DISK_AFTER_DEP_CS_IN_PER      = 0.05
	HAB_FREE_DISK_AFTER_DEP_PG_IN_PER      = 0.15
	HAB_FREE_DISK_AFTER_DEP_OS_IN_PER      = 0.15
	HAB_FREE_DISK_AFTER_DEP_BASTION_IN_PER = 0.15

	TMP_FREE_DISK_IN_GB  = 10
	TMP_FREE_DISK_IN_PER = 0.05

	ROOT_FREE_DISK_IN_GB  = 20
	ROOT_FREE_DISK_IN_PER = 0.20

	GB_TO_BYTES = 1024 * 1024 * 1024

	TMP_DIR_REQUIRED_PERMISSION = "-rwxrwxrwx"
)
View Source
const (
	CPU_COUNT_CHECK_TITLE   = "CPU count check"
	CPU_SPEED_CHECK_TITLE   = "CPU speed check"
	MEMORY_SIZE_CHECK_TITLE = "Memory size check"
	FREE_SPACE_CHECK        = "%s free space check"

	SUCCESS_MSG        = "%s should have free space >=%vGB"
	ERROR_MSG          = "%s free space is %0.2fGB"
	SUCCESS_MSG_IN_PER = " or %v%% of total size of /hab"

	RESOLUTION_MSG = "Please run system on supported platform"

	PERMISSION_CHECK       = "%s permission check"
	PERMISSION_SUCCESS_MSG = "%s should have %s permission"
	PERMISSION_ERROR_MSG   = "%s permission is %s"
)
View Source
const (
	USER_NAME                                  = "hab"
	GROUP_NAME                                 = "hab"
	USER_ADD_CMD                               = "useradd"
	USER_DEL_CMD                               = "userdel"
	GROUP_DEL_CMD                              = "groupdel"
	SYSTEM_USER_HAB_VALIDATION_SUCCESS_TITLE   = "User creation/validation check"
	SYSTEM_USER_HAB_SUCCESS_MSG                = "User is created or found successfully"
	SYSTEM_GROUP_HAB_VALIDATION_SUCCESS_TITLE  = "Group creation/validation check"
	SYSTEM_GROUP_HAB_SUCCESS_MSG               = "Group is created or found successfully"
	SYSTEM_USERANDGROUP_MAPPING_SUCCESS_TITLE  = "User and group mapping successfully"
	SYSTEM_USERANDGROUP_MAPPING_SUCCESS_MSG    = "User and group mapping successful"
	SYSTEM_USER_HAB_VALIDATION_FAILURE_TITLE   = "User validation failure"
	SYSTEM_USER_HAB_ERROR_MSG                  = "Hab user creation failed"
	SYSTEM_USER_HAB_RESOLUTION_MSG             = "Failed to add/find ‘hab’ user. Please check the user privileges and provide access to create/find user."
	SYSTEM_GROUP_HAB_VALIDATION_FAILURE_TITLE  = "Group validation failure"
	SYSTEM_GROUP_HAB_ERROR_MSG                 = "Hab group not found"
	SYSTEM_GROUP_HAB_RESOLUTION_MSG            = "Failed to add/find ‘hab’ group. Please check the user privileges and provide access to create/find group."
	SYSTEM_USERANDGROUP_MAPPING_FAILURE_TITLE  = "User and group mapping failed"
	SYSTEM_PRIMARYGROUP_MATCH_ERROR_MSG        = "Primary group mapping for user hab is not hab group"
	SYSTEM_USERANDGROUP_MAPPING_RESOLUTION_MSG = "Failed to map ‘hab’ user to ‘hab’ group. Please check the user privileges and provide access to map users to a group."
)
View Source
const AWS_OPENSEARCH_S3_BUCKET_ACCESS = "aws-opensearch-s3-bucket-access"
View Source
const CERTIFICATE = "certificate"
View Source
const EXTERNAL_OPENSEARCH = "external-opensearch"
View Source
const EXTERNAL_POSTGRESQL = "external-postgresql"
View Source
const FIREWALL = "firewall"
View Source
const (
	FIREWALL_TITLE = "check for reachability of service at destination port from the source node"
)
View Source
const FQDN = "fqdn"
View Source
const GCP_BACKUP_CONFIG = "gcp-backup-config"
View Source
const HARDWARE_RESOURCE_COUNT = "hardware-resource-count"
View Source
const NFS_BACKUP_CONFIG = "nfs-backup-config"
View Source
const NFS_MOUNT_MSG = "NFS Mount Backup Check"
View Source
const S3_BACKUP_CONFIG = "s3-backup-config"
View Source
const SOFTWARE_VERSIONS = "software-versions"
View Source
const SSH_USER = "ssh-user"
View Source
const SYSTEM_RESOURCES = "system-resources"
View Source
const SYSTEM_USER = "system-user"

Variables

This section is empty.

Functions

func GetBastionChecks

func GetBastionChecks() []string

func GetCheckMessageByName

func GetCheckMessageByName(CheckName string) string

func GetRemoteChecks

func GetRemoteChecks() []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL