Drivetrain HA skeleton model
Change-Id: Ie5008cfeec308fee04effe3cc06cbca01232bcb6
diff --git a/classes/cluster/drivetrain_ha/cicd/control/init.yml b/classes/cluster/drivetrain_ha/cicd/control/init.yml
new file mode 100644
index 0000000..6fb78de
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/cicd/control/init.yml
@@ -0,0 +1,399 @@
+classes:
+ # GlusterFS
+ - system.glusterfs.server.cluster
+ - system.glusterfs.server.volume.aptly
+ - system.glusterfs.server.volume.elasticsearch
+ - system.glusterfs.server.volume.devops_portal
+ - system.glusterfs.server.volume.gerrit
+ - system.glusterfs.server.volume.jenkins
+ - system.glusterfs.server.volume.mongodb
+ - system.glusterfs.server.volume.mysql
+ - system.glusterfs.server.volume.openldap
+ - system.glusterfs.server.volume.postgresql
+ - system.glusterfs.server.volume.pushkin
+ - system.glusterfs.server.volume.registry
+ - system.glusterfs.server.volume.rundeck
+ - system.glusterfs.server.volume.security_monkey
+ #- system.glusterfs.server.volume.salt
+
+ - system.glusterfs.client.cluster
+ - system.glusterfs.client.volume.aptly
+ - system.glusterfs.client.volume.devops_portal
+ - system.glusterfs.client.volume.elasticsearch
+ - system.glusterfs.client.volume.gerrit
+ - system.glusterfs.client.volume.jenkins
+ - system.glusterfs.client.volume.mongodb
+ - system.glusterfs.client.volume.mysql
+ - system.glusterfs.client.volume.openldap
+ - system.glusterfs.client.volume.postgresql
+ - system.glusterfs.client.volume.pushkin
+ - system.glusterfs.client.volume.registry
+ - system.glusterfs.client.volume.rundeck
+ - system.glusterfs.client.volume.security_monkey
+ #- system.glusterfs.client.volume.salt
+
+ # Docker
+ - system.docker.host
+ # Docker services
+ - system.docker.swarm.stack.aptly
+ - system.docker.swarm.stack.devops_portal
+ - system.docker.swarm.stack.docker
+ - system.docker.swarm.stack.elasticsearch
+ - system.docker.swarm.stack.gerrit
+ - system.docker.swarm.stack.janitor_monkey
+ - system.docker.swarm.stack.jenkins
+ - system.docker.swarm.stack.ldap
+ - system.docker.swarm.stack.postgresql
+ - system.docker.swarm.stack.pushkin
+ - system.docker.swarm.stack.rundeck
+ - system.docker.swarm.stack.security_monkey
+ # Docker networks
+ - system.docker.swarm.network.runbook
+
+ # Aptly
+ # We need aptly-publisher.yml on each node for our Jenkins slaves in docker
+ - system.aptly.client.publisher
+
+ # Keepalived
+ - system.keepalived.cluster.instance.cicd_control_vip
+
+ # HAProxy
+ - system.salt.minion.cert.proxy
+ - system.haproxy.proxy.single
+ - system.haproxy.proxy.listen.cicd.aptly
+ - system.haproxy.proxy.listen.cicd.gerrit
+ - system.haproxy.proxy.listen.cicd.jenkins
+ - system.haproxy.proxy.listen.docker.registry
+ - system.haproxy.proxy.listen.docker.visualizer
+ - system.haproxy.proxy.listen.mysql
+ - system.haproxy.proxy.listen.openldap
+ - system.haproxy.proxy.listen.oss.devops_portal
+ - system.haproxy.proxy.listen.oss.elasticsearch
+ - system.haproxy.proxy.listen.oss.janitor_monkey
+ - system.haproxy.proxy.listen.oss.mongodb
+ - system.haproxy.proxy.listen.oss.postgresql
+ - system.haproxy.proxy.listen.oss.pushkin
+ - system.haproxy.proxy.listen.oss.rundeck
+ - system.haproxy.proxy.listen.oss.security_monkey
+ - system.haproxy.proxy.listen.phpldapadmin
+ - system.haproxy.proxy.listen.stats
+
+ # OSS Tooling
+ - system.devops_portal.service.elasticsearch
+ - system.devops_portal.service.gerrit
+ - system.devops_portal.service.janitor_monkey
+ - system.devops_portal.service.jenkins
+ - system.devops_portal.service.pushkin
+ - system.devops_portal.service.rundeck
+ - system.devops_portal.service.security_monkey
+
+ # Rundeck
+ - system.rundeck.client.runbook
+
+ - cluster.drivetrain_ha
+parameters:
+ _param:
+ cluster_node01_name: ci01
+ cluster_node01_address: ${_param:control_node01_address}
+ cluster_node02_name: ci02
+ cluster_node02_address: ${_param:control_node02_address}
+ cluster_node03_name: ci03
+ cluster_node03_address: ${_param:control_node03_address}
+
+ keepalived_vip_virtual_router_id: 180
+ keepalived_vip_priority: 103
+ keepalived_vip_password: password
+ keepalived_vip_interface: ens3
+
+ cluster_vip_address: ${_param:control_vip_address}
+ cluster_public_host: ${_param:control_public_host}
+ glusterfs_service_host: ${_param:control_vip_address}
+
+ # Haproxy SSL configuration
+ cluster_ssl_certificate:
+ enabled: true
+ pem_file: /etc/haproxy/ssl/${_param:cluster_public_host}-all.pem
+ haproxy_bind_address: ${_param:cluster_vip_address}
+ haproxy_mysql_source_port: 13306
+
+ docker_registry_http_secret: aikemee4AhK0Eechai2eh6aa3eeWiet9
+
+ # CI/CD service databases
+ mysql_admin_password: password
+ mysql_gerrit_password: password
+
+ # OpenLDAP
+ openldap_organisation: ${_param:cluster_name}
+ openldap_dn: 'dc=cicd-lab-dev,dc=local'
+ openldap_domain: ${linux:system:domain}
+ openldap_admin_password: password
+ openldap_config_password: password
+ openldap_readonly_password: password
+
+ # PostgreSQL
+ postgresql_client_user: ${_param:postgresql_admin_user}
+ postgresql_client_password: ${_param:postgresql_admin_user_password}
+ postgresql_client_host: ${_param:haproxy_postgresql_bind_host}
+ postgresql_client_port: ${_param:haproxy_postgresql_bind_port}
+
+ # CI/CD service setup
+ # Jenkins
+ jenkins_client_user: admin
+ jenkins_client_password: ${_param:openldap_admin_password}
+ jenkins_admin_email: ${_param:admin_email}
+ jenkins_admin_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD3hnJDKW4R+aXxdaSJSQmV4a6tRmRI1CECkccApr0h15dXGhgeRyrtMsXKpVkQpweQX+75rJHVcNvHpCsR3wLhS/vgOowQh+Xc7bvl9MzoYBGUw5VZyRD4HoHrp2FEUHQqwnOYubFdHBnOi6HZDdf1axFzjmymQX/XvuAd4vCmtW/wumaJ6tH/VlM57ik5jsWwKQIQZl7ODmlGusycuD5QEPade+cHEijGbLtRyMrP+BFJAzVmav2jeu1CtLD8AaKHB+mtfbHYhFkYhLlmFenztbB9S2kJhuSDjB4c8Xxj3N0O1rhKAJPi2o4LS8boa38EnTz55wq02/DxNMSgs9H0BFKK5qRuhaG4GB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AxULs1rQ9HT9cJamxDW1Eg06+XJs3qqVm/koY8ZHSif0B
+ hlWhdx6YD0QM/4sfCDfcppuCCls+SDdJAoIBAGOmLLREQcl+ybvEkIcV/ZBEtTQG
+ lkKx7qp7dn1EKNDS12iahNprSL/kW56oQExe2ASnnRT0Og7mXk5nD6SowqbUBqEg
+ /KXRK+tujXHHnXq+lPPpOoCXZPRt0PxI10Nkutn8fYIfTu0oTbDp2K9nWP5vFhpP
+ PkFlXvAGNZbZ69VgDmNTqJZ1tSGTJKJqy/t8h49XNKRKmzNkbHFroLbeI5RTsNcW
+ +GWI3ciQTOkRCmaVFlMoQv/f8SFSRSfxk6lncb7gm9dS0j6Xvs+PgmHtNj1kNQk3
+ W4N2eiliSdd5DY6NUs5HJcH8tsxUZ6omhJ/2E5JozQ8WeQdwbe3AvCYRbmU=
+ -----END RSA PRIVATE KEY-----
+
+ jenkins_security_ldap_server: ${_param:cluster_vip_address}
+ jenkins_security_ldap_root_dn: ${_param:openldap_dn}
+ jenkins_security_ldap_manager_dn: "cn=admin,${_param:openldap_dn}"
+ jenkins_security_ldap_manager_password: ${_param:openldap_admin_password}
+ # XXX: doesn't work for some unknown reason
+# jenkins_security_ldap_user_search_base: ou=people,${_param:openldap_dn}
+# jenkins_security_ldap_group_search_base: ou=groups,${_param:openldap_dn}
+ # Jobs params
+ jenkins_gerrit_url: ssh://admin@${_param:haproxy_gerrit_bind_host}:${_param:haproxy_gerrit_ssh_bind_port}
+ jenkins_aptly_api_url: http://${_param:haproxy_aptly_api_bind_host}:${_param:haproxy_aptly_api_bind_port}
+ jenkins_aptly_url: http://${_param:haproxy_aptly_public_bind_host}:${_param:haproxy_aptly_public_bind_port}
+
+ # Gerrit
+ gerrit_auth_type: LDAP
+ gerrit_ldap_server: "ldap://${_param:cluster_vip_address}"
+ gerrit_ldap_bind_user: "cn=admin,${_param:openldap_dn}"
+ gerrit_ldap_bind_password: ${_param:openldap_admin_password}
+ gerrit_ldap_account_base: ou=people,${_param:openldap_dn}
+ gerrit_ldap_group_base: ou=groups,${_param:openldap_dn}
+ gerrit_admin_email: ${_param:admin_email}
+ gerrit_public_host: http://${_param:haproxy_gerrit_bind_host}:${_param:haproxy_gerrit_bind_port}
+ gerrit_admin_public_key: ${_param:jenkins_admin_public_key}
+ gerrit_admin_private_key: ${_param:jenkins_admin_private_key}
+ gerrit_admin_password: password
+
+ # Aptly
+ aptly_gpg_keypair_id: 6C0B7F8E
+ aptly_gpg_passphrase:
+ aptly_gpg_public_key: |
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ Version: GnuPG v1
+ mQENBFhSxjwBCADDiI85tVV+Wu44LTySzY8+NiGHWrFDXpV1BfwS5I2L0YOtp334
+ Ma3toeBo9PJG0LBC31D1EseKIXcz+91j8m0WbFPd/r5H9aK1Qv8Mss6dNLUiz63/
+ zOI7VbfnH73dxGhDTN3rP2OaYFtw2L09nfcAunV5tyJuG2GrNYi7bOLeNQ3HR1mz
+ pA0cArmRbysfwKn+E82nwnglC4vQD7+UDoBMU1/82qqOZNdqMOAD1Rd9S4QG3q80
+ bI9Bc8sOOkrdUa4XWN8DdvaT/4z4evMjhbMjqo8m69+Z66EUrgL+PCYbEVeZt8g9
+ pcESB/2zv0w0PDifwKoHVkzplxGFrp5Q65TvABEBAAG0LEFUJlQgQ0kvQ0QgQXB0
+ bHkgc2lnbmluZyBrZXkgPGFwdGx5QGF0dC5jb20+iQE4BBMBAgAiBQJYUsY8AhsD
+ BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRC5cJVmbAt/joBeB/0efCqtvYal
+ vfCM9VfOZ3nHebDO/Xy31QYJZyE/XBBaM29ZZos2p1p9pqybMz35DASsauDpbNv3
+ lO/DYAb4QXeiBlTk/2CbQlj7GTCYSzxKSAZf6PaGSE+xVfWLZe5pb36YQpFYFl80
+ 17KpPT1LWbpyLD+NIa7UzK3PLcWTO7IdcqS4BZ8gEfVAyifZuyQubLU/u/uvqCdy
+ cP+kdYc6qIYWkTo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Ez2EOESpmK0ZwMxbpeN0cBVz4mmfcbVqHS6BziD9Q52ocPl4sR0C1RDao1w/
+ RLphNMQ1CdmJnSRDhC2SzJI+Bsy+dPgf9XdvT8PlKKSTPGWR/fbBE51/q1DOQ3Aw
+ hwv6KlZAw/ozIKtbsh74Q1wlxotO3FgbA2Pk9Zqb8ZabhJQCpegr/le92PFZMUyw
+ NA==
+ =MGAS
+ -----END PGP PRIVATE KEY BLOCK-----
+
+ # Pushkin
+ pushkin_db_user: pushkin
+ pushkin_db_user_password: pushkin
+ pushkin_db_host: ${_param:haproxy_postgresql_bind_host}
+ webhook_from: johndoe@mirantis.com
+ webhook_recipients: "johnnydoe@mirantis.com,janiedoe@mirantis.com"
+ webhook_login_id: 11
+ webhook_application_id: 23
+ webhook_sfdc_username: janeroe@mirantis.com
+
+ # SecurityMonkey
+ secmonkey_db_user: secmonkey
+ secmonkey_db_user_password: secmonkey
+ secmonkey_db_host: ${_param:haproxy_postgresql_bind_host}
+ security_monkey_openstack:
+ username: admin
+ password: password
+ auth_url: http://172.17.16.129/identity/v3
+
+ # Rundeck
+ rundeck_db_host: ${_param:haproxy_postgresql_bind_host}
+ rundeck_db_user: rundeck
+ rundeck_db_user_password: password
+ rundeck_postgresql_username: ${_param:rundeck_db_user}
+ rundeck_postgresql_password: ${_param:rundeck_db_user_password}
+ rundeck_postgresql_database: rundeck
+ rundeck_postgresql_host: ${_param:rundeck_db_host}
+ rundeck_cis_os_auth_url: http://172.17.16.129:5000/v3/auth/tokens
+ rundeck_cis_elasticsearch_url: http://${_param:haproxy_elasticsearch_bind_host}:${_param:haproxy_elasticsearch_http_bind_port}
+ rundeck_runbook_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBPHRctBuN16hVe05HxKeN1AqPqbjvWvqQ1zcr/sbJJXHgVBTACRD6G+DAi7SSJr7dLzyeNo042szJclsH/qf9h0tcytINATzye//x6MtzXZ4YIDkcd1Yhz1LRgCXk1PvIensJAdClYOymx+SRa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p1EsL+LE5tzc3m54WfJ884LLI+nx8ynKU
+ HrbaLCGCK09bLNXM7XkFTe9s+XrJzgqdff/rF2nZHHyoqPObSgaG//HnAoGBANA8
+ TusN74PUX4ABLwGCLEd4/qRa0kgFtwngrcUY9XMWhrJUqi9tKJLN2URhqTbOzFA0
+ qv3n6TgZQSVH4ojmgL8EElSU2qKjDQ/jk/kEr5A+sBLdzXWZWdGv/BdB2yn95JH4
+ qoD4E9PWkNwz+e6I5PivXrVVIA0PEZ2cthutR/dlAoGBAORHzvfoEzpliijSZ1h2
+ Qw67iWUngH8DnJSnvRnbKkSoTBJgqd5eVnCX5r/zs4Ky2kdRdQvWd0QaJVgc/Pcv
+ GjrXkS60+JPOEvNyRmU6ue3z5Yi03lIGdhFeS+QTUw0Z31bAaz7NUxwNixtsS1u2
+ Bftj7QbhBFfiNyCJDDSDi/XnAoGAbsd2sIO0ZSypNZ7rk+Ddj5Rl26fZcKlhq+aU
+ a2OQyI42UE7MTvjCef760+8kp1yywwSR5wvmPYrp5lxsvqnp2jTfT5H1Ekqt20MV
+ 6Ic+ov1GjHLlJ+fSKcR21ySY5KkGXUWt53iSi8L9Q7h/ARBgx4/8UXmc2HWoyHGj
+ S+wOeiUCgYA2EMH3QOP+LewScNkdgDr9e20+NxmZs+b0ZOk6JAUE+/YLSNDlRQZV
+ fL0f0cjIyCdKfv+nR4gdMnm8RDHBiAqrKK3X9tiZ0fGmPHB+OLwYV8wE1u9jkJDA
+ IJA5GNU+Uj6+WbPO+hGn3NBWfb7/tR3ojSv7cBf2eEUh/vLSE9joKA==
+ -----END RSA PRIVATE KEY-----
+
+ salt:
+ minion:
+ cert:
+ proxy:
+ alternative_names: "DNS:${_param:cluster_public_host}, DNS:*.${_param:cluster_public_host}, IP:${_param:control_vip_address}, IP:${_param:single_address}"
+ key_file: /etc/haproxy/ssl/${_param:cluster_public_host}.key
+ cert_file: /etc/haproxy/ssl/${_param:cluster_public_host}.crt
+ all_file: /etc/haproxy/ssl/${_param:cluster_public_host}-all.pem
+ ca_file: /etc/haproxy/ssl/${_param:salt_minion_ca_authority}-ca.crt
+ user: root
+ group: haproxy
+ mode: 640
+ haproxy:
+ proxy:
+ enabled: true
+ linux:
+ network:
+ resolv:
+ dns:
+ - 172.18.176.4
+ - 172.18.176.5
+ - 8.8.8.8
+ system:
+ package:
+ ca-certificates-java:
+ version: latest
diff --git a/classes/cluster/drivetrain_ha/cicd/control/master.yml b/classes/cluster/drivetrain_ha/cicd/control/master.yml
new file mode 100644
index 0000000..6d93273
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/cicd/control/master.yml
@@ -0,0 +1,46 @@
+classes:
+ - system.docker.swarm.master
+ # Services
+ - system.docker.client
+ - system.aptly.server.docker
+ # Jenkins
+ - system.jenkins.master.config
+ - system.jenkins.client
+ - system.jenkins.client.node
+ # ..credentials
+ - system.jenkins.client.credential.gerrit
+ - system.jenkins.client.credential.salt
+ # ..security
+ - system.jenkins.client.security.ldap
+ - system.jenkins.client.security.matrix
+ # ..jobs
+ - system.jenkins.client.job.aptly
+ - system.jenkins.client.job.git-mirrors.downstream.pipelines
+ - system.jenkins.client.job.deploy.lab.mk.physical
+ - system.jenkins.client.job.deploy.update.package
+ - system.jenkins.client.job.deploy.update.config
+ # Gerrit
+ - system.gerrit.client
+ - system.gerrit.client.project.ci
+ # OpenLDAP
+ - system.openldap.client
+ - system.openldap.client.people.admin
+ # PostgreSQL
+ - system.postgresql.client.pushkin
+ - system.postgresql.client.rundeck
+ - system.postgresql.client.security_monkey
+
+ # Elasticsearch
+ - system.elasticsearch.client
+ - system.elasticsearch.client.index.pushkin
+ - system.elasticsearch.client.index.janitor_monkey
+
+ # DevOps Portal
+ - service.devops_portal.config
+ # Rundeck
+ - system.rundeck.server.docker
+ - system.rundeck.client
+ # ..projects
+ - system.rundeck.client.project.cicd
+ # At last
+ - cluster.drivetrain_ha.cicd.control
diff --git a/classes/cluster/drivetrain_ha/cicd/control/slave.yml b/classes/cluster/drivetrain_ha/cicd/control/slave.yml
new file mode 100644
index 0000000..a3a289a
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/cicd/control/slave.yml
@@ -0,0 +1,3 @@
+classes:
+ - cluster.drivetrain_ha.cicd.control
+ - system.docker.swarm.manager
diff --git a/classes/cluster/drivetrain_ha/cicd/init.yml b/classes/cluster/drivetrain_ha/cicd/init.yml
new file mode 100644
index 0000000..816b66f
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/cicd/init.yml
@@ -0,0 +1,37 @@
+parameters:
+ _param:
+ cicd_control_address: 172.16.10.254
+ cicd_control_node01_address: 172.16.10.11
+ cicd_control_node02_address: 172.16.10.12
+ cicd_control_node03_address: 172.16.10.13
+
+ # CI/CD control infrastructure
+ control_node01_address: ${_param:cicd_control_node01_address}
+ control_node02_address: ${_param:cicd_control_node02_address}
+ control_node03_address: ${_param:cicd_control_node03_address}
+ control_vip_address: ${_param:cicd_control_address}
+ control_public_host: ${_param:control_vip_address}
+ linux:
+ network:
+ host:
+ cid:
+ address: ${_param:cicd_control_address}
+ names:
+ - ${_param:cicd_control_hostname}
+ - ${_param:cicd_control_hostname}.${_param:cluster_domain}
+ cid01:
+ address: ${_param:cicd_control_node01_address}
+ names:
+ - ${_param:cicd_control_node01_hostname}
+ - ${_param:cicd_control_node01_hostname}.${_param:cluster_domain}
+ cid02:
+ address: ${_param:cicd_control_node02_address}
+ names:
+ - ${_param:cicd_control_node02_hostname}
+ - ${_param:cicd_control_node02_hostname}.${_param:cluster_domain}
+ cid03:
+ address: ${_param:cicd_control_node03_address}
+ names:
+ - ${_param:cicd_control_node03_hostname}
+ - ${_param:cicd_control_node03_hostname}.${_param:cluster_domain}
+
diff --git a/classes/cluster/drivetrain_ha/cicd/worker.yml b/classes/cluster/drivetrain_ha/cicd/worker.yml
new file mode 100644
index 0000000..ec89b93
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/cicd/worker.yml
@@ -0,0 +1,6 @@
+classes:
+- system.linux.system.single
+- system.jenkins.slave.docker
+- system.aptly.client.publisher
+- cluster.drivetrain_ha
+
diff --git a/classes/cluster/drivetrain_ha/infra/config.yml b/classes/cluster/drivetrain_ha/infra/config.yml
new file mode 100644
index 0000000..fbad093
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/infra/config.yml
@@ -0,0 +1,70 @@
+classes:
+- system.salt.master.pkg
+- system.salt.master.api
+- system.salt.minion.ca.salt_master
+- system.reclass.storage.salt
+- system.sphinx.server.doc.reclass
+- cluster.drivetrain_ha
+parameters:
+ _param:
+ reclass_data_repository: "https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab"
+ reclass_data_revision: master
+ reclass_config_master: ${_param:infra_config_deploy_address}
+ single_address: ${_param:infra_config_address}
+ linux_system_codename: xenial
+ salt_master_base_environment: prd
+ salt_minion_ca_host: ${linux:network:fqdn}
+ salt_master_host: ${_param:infra_config_deploy_address}
+ salt_api_password: hovno12345!
+ salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
+ salt:
+ master:
+ reactor:
+ reclass/minion/classify:
+ - salt://reclass/reactor/node_register.sls
+ linux:
+ network:
+ interface:
+ ens4:
+ enabled: true
+ type: eth
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ reclass:
+ storage:
+ class_mapping:
+ common_node:
+ expression: all
+ node_param:
+ single_address:
+ value_template: <<node_control_ip>>
+ linux_system_codename:
+ value_template: <<node_os>>
+ salt_master_host:
+ value_template: <<node_master_ip>>
+ infra_config:
+ expression: <<node_hostname>>__startswith__cfg
+ cluster_param:
+ infra_config_address:
+ value_template: <<node_control_ip>>
+ infra_config_deploy_address:
+ value_template: <<node_deploy_ip>>
+ cluster_domain:
+ value_template: <<node_domain>>
+ cicd_control01:
+ expression: <<node_hostname>>__equals__cid01
+ cluster_param:
+ cicd_control_node01_address:
+ value_template: <<node_control_ip>>
+ cicd_control02:
+ expression: <<node_hostname>>__equals__cid02
+ cluster_param:
+ cicd_control_node02_address:
+ value_template: <<node_control_ip>>
+ cicd_control03:
+ expression: <<node_hostname>>__equals__cid03
+ cluster_param:
+ cicd_control_node03_address:
+ value_template: <<node_control_ip>>
+
diff --git a/classes/cluster/drivetrain_ha/infra/init.yml b/classes/cluster/drivetrain_ha/infra/init.yml
new file mode 100644
index 0000000..d5e7cd7
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/infra/init.yml
@@ -0,0 +1,33 @@
+classes:
+- system.linux.system.single
+- system.rsyslog.client.single
+- system.linux.system.haveged
+- system.linux.system.prompt
+- system.linux.system.motd.dynamic
+- system.openssh.server.team.lab
+- system.openssh.server.team.tcpcloud
+- system.openssh.server.team.mcp_qa
+- system.openssh.server.team.oss_team
+parameters:
+ _param:
+ cluster_domain: drivetrain_ha.local
+ cluster_name: drivetrain_ha
+ apt_mk_version: nightly
+ admin_email: root@localhosti
+ infra_config_hostname: cfg01
+ infra_config_address: 172.16.10.100
+ infra_config_deploy_address: 192.168.10.100
+ salt_minion_ca_host: ci01.${_param:cluster_domain}
+ salt_minion_ca_authority: salt_master_ca
+ linux:
+ network:
+ host:
+ cfg01:
+ address: ${_param:infra_config_address}
+ names:
+ - ${_param:infra_config_hostname}
+ - ${_param:infra_config_hostname}.${_param:cluster_domain}
+ system:
+ name: ${_param:infra_config_hostname}
+ domain: ${_param:cluster_domain}
+
diff --git a/classes/cluster/drivetrain_ha/init.yml b/classes/cluster/drivetrain_ha/init.yml
new file mode 100644
index 0000000..1a37367
--- /dev/null
+++ b/classes/cluster/drivetrain_ha/init.yml
@@ -0,0 +1,5 @@
+classes:
+- cluster.drivetrain_ha.infra
+- cluster.drivetrain_ha.cicd
+- cluster.overrides
+