mcp-day01 model added
PROD-18791
Change-Id: If85f8ec9c92d2b84584646f0af5976f3e606575a
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..089f541
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "classes/system"]
+ path = classes/system
+ url = https://github.com/Mirantis/reclass-system-salt-model.git
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1c47427
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# mcp-drivetrain-model
diff --git a/classes/cluster/mcp-day01/infra/config.yml b/classes/cluster/mcp-day01/infra/config.yml
new file mode 100644
index 0000000..d70c251
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/config.yml
@@ -0,0 +1,38 @@
+classes:
+- system.linux.system.repo.mcp.salt
+- system.linux.system.repo.mcp.extra
+- system.linux.system.repo.ubuntu
+- system.salt.master.pkg
+- system.salt.minion.ca.salt_master
+- system.salt.master.api
+- system.reclass.storage.salt
+- cluster.mcp-day01.infra
+- cluster.mcp-day01.infra.maas
+- cluster.mcp-day01.infra.jenkins
+parameters:
+ _param:
+ salt_master_base_environment: prd
+ reclass_data_repository: "https://github.com/Mirantis/mcp-drivetrain-model.git"
+ reclass_data_revision: master
+ reclass_config_master: ${_param:infra_config_deploy_address}
+ deploy_address: ${_param:infra_config_deploy_address}
+ linux_system_codename: xenial
+ salt_api_password_hash: "$6$lGeSiPvI$Gsul5ejaLB41ITn3G56QrgM0qZMW4zXgKc.oSGn.AJLc4Salx/XMBewQYwGkdHc6.ZQvPRQNeGByzYX8kdGae/"
+ salt_api_password: Ll7yvUFrd1xWe71RT4m9EmznrUPkqw6c
+ salt_master_host: ${_param:infra_config_deploy_address}
+ linux:
+ network:
+ interface:
+ ens3:
+ enabled: true
+ type: eth
+ proto: dhcp
+ salt:
+ minion:
+ master:
+ host: "localhost"
+ reclass:
+ storage:
+ data_source:
+ engine: local
+
diff --git a/classes/cluster/mcp-day01/infra/init.yml b/classes/cluster/mcp-day01/infra/init.yml
new file mode 100644
index 0000000..c5144c4
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/init.yml
@@ -0,0 +1,33 @@
+classes:
+- system.linux.system.single.debian
+#- system.openssh.server.team.cicd
+parameters:
+ _param:
+ # TODO: Uncomment next line "linux_system_user_sudo: true" during the deployment.
+ # Don't set it "false" before you configure sudo policies and enable power users.
+ # linux_system_user_sudo: true
+ apt_mk_version: "2018.3.1"
+ linux_repo_refresh_db: true
+ infra_config_hostname: cfg01
+ salt_minion_ca_host: ${_param:infra_config_hostname}.${_param:cluster_domain}
+ # infra service addresses
+ infra_config_address: 127.0.0.1
+ infra_config_deploy_address: 127.0.0.1
+ cluster_domain: mcp-day01.local
+ cluster_name: mcp-day01
+ dns_server01: 8.8.8.8
+ salt:
+ minion:
+ trusted_ca_minions:
+ - ${_param:salt_minion_ca_host}
+ linux:
+ system:
+ name: ${_param:infra_config_hostname}
+ domain: ${_param:cluster_domain}
+ purge_repos: True
+ service:
+ apt-daily.timer:
+ status: dead
+ user:
+ root:
+ password: false
diff --git a/classes/cluster/mcp-day01/infra/jenkins.yml b/classes/cluster/mcp-day01/infra/jenkins.yml
new file mode 100644
index 0000000..d132340
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/jenkins.yml
@@ -0,0 +1,133 @@
+classes:
+- system.jenkins.master.config
+- system.jenkins.master.single
+- system.jenkins.client.job.deploy.openstack
+- system.jenkins.client
+- system.jenkins.client.credential.salt
+- system.jenkins.client.user.admin
+parameters:
+ _param:
+ jenkins_client_user: admin
+ jenkins_client_password: r00tme
+ jenkins_admin_password: r00tme
+ jenkins_master_host: ${_param:infra_config_deploy_address}
+ jenkins_git_url: 'git@cfg01:/home/repo'
+ jenkins_gerrit_url: ${_param:jenkins_git_url}
+ jenkins_admin_token: AQAAABAAAABwpVdkS7iy4UHuvcbhzVNsGi85cXPhSBCrt/qKkTCNHRXuIlITVCdX9xoTHb5lllS8PAbQlo8ELG/2T3Y+aZkkzKgQrNSqvvbNie8XOMJms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aN5t02S4S4mz2Qcjm81s0pUhgQtDJdFb1qfIgBXR1Kz1
+ FwicatyYZFGnOrdgo27lrheUgpqXnXrqjgrIbfAaw+zZiQBOnhpBFV/C8FTYIHL5
+ nGpcpyVTix1zmbmaO2Mx6ScxAs/Hr7h+WGBFVgcCgYEAm+bTMH5OdSCPHFdqG2j0
+ 2NGbjSBWzdexfAyR1I3Uzv1cr86EjauVC7Ed/+U4Jh4YxvYr1IEAqltJPL24AGlf
+ iTwqwdbuKIGcEA0jnVJxzp6g+5GbqdeNUf0EpqsrRB+pu3jvemSFTrRCVrG3KHTA
+ a80S4E2OdiIIBPEbswIvOZ8CgYEA2qwOKZQdcw1l7g+tdiR7x1xe9KwPk1Njkf1f
+ PkN6qpsVj9Zzp3X5feOLbv2vyLfkUSooakb9E1as1r4lyoY7poNpf0Owf99gaC56
+ 6iKQWA+XQCkmsKaHC2wtWA03HLDnM4H8yqQSzj8Wc+EkvjU/psA/K16g0/+6ngIT
+ WbaTBksCgYBwqik2xtpU/T04kvp4Nxn1B5zF6DNtHb/0bT3BtH4K0Uyb0CMtj6dH
+ apPxcd8cUZ/QIC7alF51jY2DV1q59UxYNs816KoEXCzvCChpZlxq/ugtybyh62xw
+ CZITVJhb06RGOO0TrQybNQ+K8H4J8flt6CZ47vDjyLD3vp+BjmLz6Q==
+ -----END RSA PRIVATE KEY-----
+ linux:
+ system:
+ directory:
+ /home/repo/mcp-ci/pipeline-library:
+ user: git
+ group: www-data
+ mode: 755
+ makedirs: true
+ /home/repo/mk/mk-pipelines:
+ user: git
+ group: www-data
+ mode: 755
+ makedirs: true
+ repo:
+ jenkins-ppa:
+ source: "deb http://pkg.jenkins.io/debian-stable binary/"
+ architectures: amd64
+ key_id: D50582E6
+ key_server: https://pkg.jenkins.io/debian/jenkins-ci.org.key
+ package:
+ jenkins:
+ version: latest
+ virtualenv:
+ version: latest
+ config:
+ jenkins_master:
+ pillar:
+ jenkins:
+ master:
+ home: /var/lib/jenkins
+ user:
+ git:
+ enabled: true
+ name: git
+ sudo: false
+ full_name: git
+ home: /home/git
+ jenkins:
+ enabled: true
+ name: jenkins
+ sudo: false
+ full_name: jenkins
+ home: /var/lib/jenkins
+ openssh:
+ server:
+ enabled: true
+ user:
+ git:
+ enabled: true
+ public_keys:
+ - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDp6ijK7j8QHAcoxIMWpbJyHmowRq22k4jZxJjx1zd0bVBfYFCU/5bMJPja+ilVn4yHcjCv4bK7WkzrKD102FYAShT0GsTtw6c1BzQypno4Y/is9RzWDtbakP7VC1+RrwYXrQaIdBoS71AQM3WCaDry4FQUbgINMJcpBsFgzQcBvqjNRCFqoV3alPbxHuPihPvPKVjHI+z0VlCCrawyTNsDP731hrNSkaTSVRTiwE6Etk4CwL7iV9rMFSdKFrjdBpI0Ra6vGVT132wGg0LF2NK95QzWfMjzfxBt0XWSarrTKoffUbBCdfbWk5NgL4jfHr9HSufj+Z0QyRMrqRYBs0l1
+ user: ${linux:system:user:git}
+ client:
+ enabled: true
+ user:
+ jenkins:
+ enabled: true
+ private_key:
+ type: rsa
+ key: ${_param:git_private_key}
+ user: ${linux:system:user:jenkins}
+ config:
+ cfg01:
+ identityfile: '/var/lib/jenkins/.ssh/id_rsa'
+ jenkins:
+ master:
+ http:
+ port: 8081
+ client:
+ theme:
+ css_url: '/userContent/theme/mirantis.css'
+ js_url: '/userContent/theme/mirantis.js'
+ node:
+ master:
+ node_mode: Normal
+ remote_home: /var/lib/jenkins
+ num_executors: 4
+ launcher:
+ type: master
+ labels:
+ - python
+ - test
+ lib:
+ pipeline-library:
+ credential_id: git
+ git:
+ server:
+ enabled: true
+ directory: /home/repo
diff --git a/classes/cluster/mcp-day01/infra/maas.yml b/classes/cluster/mcp-day01/infra/maas.yml
new file mode 100644
index 0000000..31b1520
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/maas.yml
@@ -0,0 +1,36 @@
+classes:
+- system.maas.region.single
+- system.linux.system.repo.mcp.apt_mirantis.maas
+parameters:
+ _param:
+ maas_admin_password: r00tme
+ maas_db_password: fRqC7NJrBR0x
+ maas_region_port: 5240
+ maas_cluster_region_port: ${_param:maas_region_port}
+ maas:
+ region:
+ bind:
+ host: ${_param:deploy_address}:${_param:maas_region_port}
+ cluster:
+ region:
+ host: ${_param:deploy_address}:${_param:maas_cluster_region_port}
+ postgresql:
+ server:
+ enabled: true
+ version: 9.5
+ bind:
+ address: 127.0.0.1
+ port: 5432
+ protocol: tcp
+ clients:
+ - 127.0.0.1
+ database:
+ maasdb:
+ encoding: 'UTF8'
+ #locale: 'cs_CZ'
+ users:
+ - name: 'maas'
+ password: ${_param:maas_db_password}
+ host: 'localhost'
+ createdb: true
+ rights: 'all privileges'
diff --git a/nodes/cfg01.mcp-day01.local.yml b/nodes/cfg01.mcp-day01.local.yml
new file mode 100644
index 0000000..8a403dd
--- /dev/null
+++ b/nodes/cfg01.mcp-day01.local.yml
@@ -0,0 +1,10 @@
+classes:
+- cluster.mcp-day01.infra.config
+parameters:
+ _param:
+ linux_system_codename: xenial
+ reclass_data_revision: master
+ linux:
+ system:
+ name: cfg01
+ domain: mcp-day01.local