Is there a way to create a valid .zip file to import into Automate

Hello All -

Currently MIQ is not allowing me to import from GitHub.

As a work around, I’ve cloned the GitHub repo to my local machine and zipped the redHatConsulting_Utilities domain folder containing the __domain__.yaml file.

When I import it in Automation>Automate>Import/Export, it says it imported the zip successfully.

However, when I visit Automation>Automate>Explorer, I don’t see the redHatConsulting_Utilities domain.

I’ve logged in/out. I’ve restarted the appliance. It still doesn’t show.

Any ideas? Thanks to those who keep sharing their knowledge. It’s much appreciated!

Michael

That is strange. Maybe the __domain__.yaml is in the wrong level of the zip file and MIQ thinks it successfully imported and “empty” zip? Do you see anything interesting in the log file? I think it should be

domain1/__domain___.yaml
domain1/...
domain2/__domain__.yaml
domain2/...

The are also CLI scripts for Automate Domain import. Maybe they spit out some useful logs

vmdb
rails evm:import:help

Hi @buc, I see nothing helpful in the logs:

[----] I, [2020-06-15T14:19:35.032548 #3183:41ab6d0]  INFO -- : Processing by MiqAeToolsController#upload_import_file as HTML
[----] I, [2020-06-15T14:19:35.032642 #3183:41ab6d0]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"rPP/rCuhC10JcvzF3tGOo+eQRJo7F6g6/pm+bf/FoYg9d56alr7/j5xjikCfNzYjCIhPRBgcNLt1I4I8CPCUEw==", "upload"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0x0000000010cfe418 @tempfile=#<Tempfile:/tmp/RackMultipart20200615-3183-g6j6ac.zip>, @original_filename="miq-Utilities.zip", @content_type="application/zip", @headers="Content-Disposition: form-data; name=\"upload[file]\"; filename=\"miq-Utilities.zip\"\r\nContent-Type: application/zip\r\n">}, "commit"=>"Upload"}
[----] I, [2020-06-15T14:19:35.082340 #3183:41ab6d0]  INFO -- : Redirected to https://miq.chq.ei/miq_ae_tools/review_import?import_file_upload_id=20
[----] I, [2020-06-15T14:19:35.083051 #3183:41ab6d0]  INFO -- : Completed 302 Found in 50ms (ActiveRecord: 33.4ms)
[----] I, [2020-06-15T14:19:35.111805 #3183:41ab6d0]  INFO -- : Started GET "/miq_ae_tools/review_import?import_file_upload_id=20" for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.114041 #3183:41ab6d0]  INFO -- : Processing by MiqAeToolsController#review_import as HTML
[----] I, [2020-06-15T14:19:35.114082 #3183:41ab6d0]  INFO -- :   Parameters: {"import_file_upload_id"=>"20"}
[----] I, [2020-06-15T14:19:35.123390 #3183:41ab6d0]  INFO -- :   Rendering /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/miq_ae_tools/review_import.html.haml within layouts/application
[----] I, [2020-06-15T14:19:35.123495 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/miq_ae_tools/review_import.html.haml within layouts/application (0.0ms)
[----] I, [2020-06-15T14:19:35.123636 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_doctype.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.124796 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/stylesheets/_template50.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.125680 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_i18n_js.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.132995 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_user_options.html.haml (5.1ms)
[----] I, [2020-06-15T14:19:35.133393 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_notifications_drawer.html.haml (0.3ms)
[----] I, [2020-06-15T14:19:35.133499 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_toast_list.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.133597 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_spinner.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.133924 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/v
[----] I, [2020-06-15T14:19:35.133959 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_header.html.haml (8.2ms)
[----] I, [2020-06-15T14:19:35.162524 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_vertical_navbar.html.haml (28.4ms)
[----] I, [2020-06-15T14:19:35.162868 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_breadcrumbs.html.haml (0.2ms)
[----] I, [2020-06-15T14:19:35.163017 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_tabs.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.163067 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_center_div_no_listnav.html.haml (29.0ms)
[----] I, [2020-06-15T14:19:35.163117 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_content.html.haml (29.1ms)
[----] I, [2020-06-15T14:19:35.163794 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_adv_search_body.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.163917 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_adv_search_footer.html.haml (0.0ms)
[----] I, [2020-06-15T14:19:35.163948 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_adv_search.html.haml (0.7ms)
[----] I, [2020-06-15T14:19:35.163985 #3183:41ab6d0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/layouts/_footer.html.haml (0.8ms)
[----] I, [2020-06-15T14:19:35.164777 #3183:41ab6d0]  INFO -- : Completed 200 OK in 51ms (Views: 40.5ms | ActiveRecord: 2.3ms)
[----] I, [2020-06-15T14:19:35.796790 #3201:41c1f48]  INFO -- : Started GET "/api/notifications?expand=resources&attributes=details&sort_by=id&sort_order=desc&limit=100" for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.798146 #3183:41ab888]  INFO -- : Started GET "/ws/notifications" for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.799453 #3201:41c1f48]  INFO -- : Processing by Api::NotificationsController#index as JSON
[----] I, [2020-06-15T14:19:35.799506 #3201:41c1f48]  INFO -- :   Parameters: {"expand"=>"resources", "attributes"=>"details", "sort_by"=>"id", "sort_order"=>"desc", "limit"=>"100"}
[----] I, [2020-06-15T14:19:35.800479 #3183:41ab888]  INFO -- : Started GET "/ws/notifications/" [WebSocket] for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.800541 #3183:41ab888]  INFO -- : Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: WebSocket)
[----] I, [2020-06-15T14:19:35.803825 #3183:8d46d60]  INFO -- : Registered connection (Z2lkOi8vdm1kYi9Vc2VyLzI1)
[----] I, [2020-06-15T14:19:35.855370 #3201:41c1f48]  INFO -- : Completed 200 OK in 56ms (Views: 0.1ms | ActiveRecord: 7.5ms)
[----] I, [2020-06-15T14:19:35.859279 #3183:41aa4b0]  INFO -- : Started GET "/static/notification_drawer/notification-drawer.html" for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.861709 #3183:41aa4b0]  INFO -- : Processing by StaticController#show as HTML
[----] I, [2020-06-15T14:19:35.861761 #3183:41aa4b0]  INFO -- :   Parameters: {"id"=>"notification_drawer/notification-drawer.html"}
[----] I, [2020-06-15T14:19:35.862180 #3183:41aa4b0]  INFO -- :   Rendering /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/static/notification_drawer/notification-drawer.html.haml
[----] I, [2020-06-15T14:19:35.863278 #3183:41aa4b0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/static/notification_drawer/_notification-body.html.haml (0.9ms)
[----] I, [2020-06-15T14:19:35.865118 #3183:41aa4b0]  INFO -- :   Rendered /usr/local/lib/ruby/gems/2.5.0/bundler/gems/manageiq-ui-classic-799bc8cad8b8/app/views/static/notification_drawer/notification-drawer.html.haml (2.9ms)
[----] I, [2020-06-15T14:19:35.865285 #3183:41aa4b0]  INFO -- : Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.0ms)
[----] I, [2020-06-15T14:19:35.884422 #3183:41ab450]  INFO -- : Started GET "/miq_ae_tools/automate_json?import_file_upload_id=20" for 172.20.74.80 at 2020-06-15 14:19:35 -0400
[----] I, [2020-06-15T14:19:35.886896 #3183:41ab450]  INFO -- : Processing by MiqAeToolsController#automate_json as JS
[----] I, [2020-06-15T14:19:35.886938 #3183:41ab450]  INFO -- :   Parameters: {"import_file_upload_id"=>"20"}
[----] I, [2020-06-15T14:19:35.937084 #3183:41ab450]  INFO -- : Completed 500 Internal Server Error in 50ms (Views: 0.1ms | ActiveRecord: 14.1ms)
[----] I, [2020-06-15T14:19:39.316306 #3183:41aa7bc]  INFO -- : Started GET "/ping" for 10.1.11.71 at 2020-06-15 14:19:39 -0400
[----] I, [2020-06-15T14:19:39.318853 #3183:41aa7bc]  INFO -- : Processing by PingController#index as HTML
[----] I, [2020-06-15T14:19:39.320881 #3183:41aa7bc]  INFO -- :   Rendering text template
[----] I, [2020-06-15T14:19:39.320972 #3183:41aa7bc]  INFO -- :   Rendered text template (0.0ms)
[----] I, [2020-06-15T14:19:39.321383 #3183:41aa7bc]  INFO -- : Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms)
[----] I, [2020-06-15T14:19:39.960871 #3183:41ab6d0]  INFO -- : Started GET "/ping" for 10.1.11.70 at 2020-06-15 14:19:39 -0400
[----] I, [2020-06-15T14:19:39.963370 #3183:41ab6d0]  INFO -- : Processing by PingController#index as HTML
[----] I, [2020-06-15T14:19:39.965003 #3183:41ab6d0]  INFO -- :   Rendering text template
[----] I, [2020-06-15T14:19:39.965082 #3183:41ab6d0]  INFO -- :   Rendered text template (0.0ms)
[----] I, [2020-06-15T14:19:39.965438 #3183:41ab6d0]  INFO -- : Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.0ms)

@buc here’s how I’m forming the .zip file:

  1. Clone the miq-Utilities repo from https://github.com/rhtconsulting/miq-Utilities.git
  2. This repo contains the following folders and files:
    image
  3. I zip the Automate folder which contains:
Automate (folder)
    RedHatConsulting_Utilities (folder - Domain)
        AutomationManagement (folder - Namespace)
        Cloud (folder - Namespace)
        Infrastructure (folder - Namespace)
        Integration (folder - Namespace)
        Service (folder - Namespace)
        StdLib (folder - Namespace)
        System (folder - Namespace)
        __domain__.yaml

That didn’t work. Error:
image

Also tried zipping the domain folder itself (RedHatConsulting_Utilities). Importing that gives the same error:
image