From 502ba0c5b9a896b91b0fe6f53db9965ad3ab5cb9 Mon Sep 17 00:00:00 2001
From: Takashi Kajinami <kajinamit@oss.nttdata.com>
Date: Tue, 5 Mar 2024 22:52:00 +0900
Subject: [PATCH] Remove murano

The murano project is being marked inactive[1] and will be excluded
from caracal release. Because of the project status and the fact that
puppet-murano has had no meaningful update or feedback from actual
users, we decided to retire the module in this cycle[2].

[1] https://review.opendev.org/c/openstack/governance/+/910434
[2] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/message/VHE6WWZKOTTKBLUVMABAAQKBN2QSEED4/

Change-Id: I0f21526476de33761ed17bae27d9915072b1cade
---
 Puppetfile              |   4 --
 README.md               |   1 -
 fixtures/scenario003.pp |   3 --
 manifests/murano.pp     | 112 ----------------------------------------
 manifests/provision.pp  |   8 ---
 manifests/tempest.pp    |   6 ---
 openstack_modules.txt   |   1 -
 zuul.d/base.yaml        |   1 -
 8 files changed, 136 deletions(-)
 delete mode 100644 manifests/murano.pp

diff --git a/Puppetfile b/Puppetfile
index 385c84d2e..ec97d234e 100644
--- a/Puppetfile
+++ b/Puppetfile
@@ -65,10 +65,6 @@ mod 'mistral',
   :git => 'https://opendev.org/openstack/puppet-mistral',
   :ref => 'master'
 
-mod 'murano',
-  :git => 'https://opendev.org/openstack/puppet-murano',
-  :ref => 'master'
-
 mod 'neutron',
   :git => 'https://opendev.org/openstack/puppet-neutron',
   :ref => 'master'
diff --git a/README.md b/README.md
index 202858d48..85fd463b9 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,6 @@ scenario](#all-in-one).
 | horizon    |             |       X     |       X     |      X      |      X      |      X       |
 | ironic     |             |       X     |             |             |             |              |
 | zaqar      |             |       X     |             |             |             |              |
-| murano     |             |             |       X     |             |             |              |
 | magnum     |             |             |       X     |             |             |              |
 | mistral    |             |             |       X     |             |             |              |
 | barbican   |             |       X     |       X     |             |             |              |
diff --git a/fixtures/scenario003.pp b/fixtures/scenario003.pp
index 27c118c1c..df726a10f 100644
--- a/fixtures/scenario003.pp
+++ b/fixtures/scenario003.pp
@@ -62,7 +62,6 @@ class { 'openstack_integration::horizon':
 }
 include openstack_integration::heat
 include openstack_integration::designate
-include openstack_integration::murano
 include openstack_integration::mistral
 include openstack_integration::provision
 
@@ -76,8 +75,6 @@ class { 'openstack_integration::tempest':
   trove          => true,
   mistral        => true,
   horizon        => true,
-  # TODO(tkajinam): Some of the murano tests still fail.
-  murano         => false,
   # NOTE(tkajinam): The scenario job we enable requires cinder, which is not
   #                 enabled in this scenario.
   heat           => false,
diff --git a/manifests/murano.pp b/manifests/murano.pp
deleted file mode 100644
index 9a6b0556e..000000000
--- a/manifests/murano.pp
+++ /dev/null
@@ -1,112 +0,0 @@
-class openstack_integration::murano {
-
-  include openstack_integration::config
-  include openstack_integration::params
-
-  $application_package_path = $facts['os']['family'] ? {
-    'RedHat' => '/var/cache/murano/meta',
-    default  => '/usr/share/murano-common',
-  }
-
-  rabbitmq_user { ['murano', 'murano_private']:
-    admin    => true,
-    password => 'an_even_bigger_secret',
-    provider => 'rabbitmqctl',
-    require  => Class['rabbitmq'],
-  }
-
-  rabbitmq_vhost { '/murano':
-    provider => 'rabbitmqctl',
-    require  => Class['rabbitmq'],
-  }
-
-  rabbitmq_user_permissions { ['murano@/', 'murano_private@/murano']:
-    configure_permission => '.*',
-    write_permission     => '.*',
-    read_permission      => '.*',
-    provider             => 'rabbitmqctl',
-    require              => [ Class['rabbitmq'], Rabbitmq_vhost['/murano'] ],
-  }
-
-  if $::openstack_integration::config::ssl {
-    openstack_integration::ssl_key { 'murano':
-      notify  => Service['murano-api'],
-      require => Package['murano-common'],
-    }
-    Exec['update-ca-certificates'] ~> Service['murano-api']
-  }
-
-  class { 'murano::db::mysql':
-    charset  => $::openstack_integration::params::mysql_charset,
-    collate  => $::openstack_integration::params::mysql_collate,
-    password => 'murano',
-    host     => $::openstack_integration::config::host,
-  }
-  class { 'murano::logging':
-    debug => true,
-  }
-  class { 'murano::db':
-    database_connection => os_database_connection({
-      'dialect'  => 'mysql+pymysql',
-      'host'     => $::openstack_integration::config::ip_for_url,
-      'username' => 'murano',
-      'password' => 'murano',
-      'database' => 'murano',
-      'charset'  => 'utf8',
-      'extra'    => $::openstack_integration::config::db_extra,
-    }),
-  }
-  class { 'murano::keystone::authtoken':
-    password                     => 'a_big_secret',
-    user_domain_name             => 'Default',
-    project_domain_name          => 'Default',
-    auth_url                     => $::openstack_integration::config::keystone_admin_uri,
-    www_authenticate_uri         => $::openstack_integration::config::keystone_auth_uri,
-    memcached_servers            => $::openstack_integration::config::memcached_servers,
-    service_token_roles_required => true,
-  }
-  class { 'murano':
-    default_transport_url => os_transport_url({
-      'transport' => $::openstack_integration::config::messaging_default_proto,
-      'host'      => $::openstack_integration::config::host,
-      'port'      => $::openstack_integration::config::messaging_default_port,
-      'username'  => 'murano',
-      'password'  => 'an_even_bigger_secret',
-    }),
-    rabbit_os_use_ssl     => $::openstack_integration::config::ssl,
-    rabbit_own_user       => 'murano_private',
-    rabbit_own_password   => 'an_even_bigger_secret',
-    rabbit_own_vhost      => '/murano',
-    rabbit_own_host       => $::openstack_integration::config::host,
-    rabbit_own_port       => $::openstack_integration::config::rabbit_port,
-    rabbit_own_use_ssl    => $::openstack_integration::config::ssl,
-    use_ssl               => $::openstack_integration::config::ssl,
-    service_host          => $::openstack_integration::config::ip_for_url,
-    cert_file             => $::openstack_integration::params::cert_path,
-    key_file              => "/etc/murano/ssl/private/${facts['networking']['fqdn']}.pem",
-  }
-  class { 'murano::api':
-    host    => $::openstack_integration::config::host,
-    workers => 2,
-  }
-
-  class { 'murano::engine':
-    workers => 2,
-  }
-
-  class { 'murano::keystone::auth':
-    public_url   => "${::openstack_integration::config::base_url}:8082",
-    internal_url => "${::openstack_integration::config::base_url}:8082",
-    admin_url    => "${::openstack_integration::config::base_url}:8082",
-    roles        => ['admin', 'service'],
-    password     => 'a_big_secret',
-  }
-
-  # TODO(tkajinam): murano_application is not idempotent in Ubuntu
-  if $facts['os']['family'] == 'RedHat' {
-    murano_application { 'io.murano':
-      package_path => "${application_package_path}/io.murano.zip",
-    }
-    Keystone_user_role<||> -> Murano_application['io.murano']
-  }
-}
diff --git a/manifests/provision.pp b/manifests/provision.pp
index 1ba0229f8..7ffb565d3 100644
--- a/manifests/provision.pp
+++ b/manifests/provision.pp
@@ -42,14 +42,6 @@ class openstack_integration::provision (
       vcpus  => '1',
     }
 
-    # NOTE(amoralej): "m1.tiny" flavor is required by murano scenario tests
-    nova_flavor { 'm1.tiny':
-      ensure => present,
-      id     => '1',
-      ram    => '128',
-      disk   => '2',
-      vcpus  => '1',
-    }
     Keystone_user_role['admin@openstack'] -> Nova_flavor<||>
   }
 
diff --git a/manifests/tempest.pp b/manifests/tempest.pp
index c7b709404..e4ecc45f8 100644
--- a/manifests/tempest.pp
+++ b/manifests/tempest.pp
@@ -84,10 +84,6 @@
 #   (optional) Define if Octavia needs to be tested.
 #   Default to false.
 #
-# [*murano*]
-#   (optional) Define if Murano needs to be tested.
-#   Default to false.
-#
 # [*swift*]
 #   (optional) Define if Swift needs to be tested.
 #   Default to false.
@@ -170,7 +166,6 @@ class openstack_integration::tempest (
   $magnum                  = false,
   $manila                  = false,
   $mistral                 = false,
-  $murano                  = false,
   $neutron                 = true,
   $nova                    = true,
   $octavia                 = false,
@@ -347,7 +342,6 @@ class openstack_integration::tempest (
     ca_certificates_file               => $::openstack_integration::params::ca_bundle_cert_path,
     manage_tests_packages              => true,
     attach_encrypted_volume            => $attach_encrypted_volume,
-    murano_available                   => $murano,
     tempest_workspace                  => '/tmp/openstack/tempest',
     run_ssh                            => true,
     l2gw_switch                        => $l2gw_switch,
diff --git a/openstack_modules.txt b/openstack_modules.txt
index 298a593da..d4d6f869a 100644
--- a/openstack_modules.txt
+++ b/openstack_modules.txt
@@ -14,7 +14,6 @@ keystone
 magnum
 manila
 mistral
-murano
 neutron
 nova
 octavia
diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml
index 00f92b5b4..da3a614e1 100644
--- a/zuul.d/base.yaml
+++ b/zuul.d/base.yaml
@@ -22,7 +22,6 @@
       - name: openstack/puppet-manila
       - name: openstack/puppet-mistral
       - name: x/puppet-modulesync-configs
-      - name: openstack/puppet-murano
       - name: openstack/puppet-neutron
       - name: openstack/puppet-nova
       - name: openstack/puppet-octavia