Giter Club home page Giter Club logo

manageiq-v2v's Introduction

ManageIQ::V2V

Build Status Maintainability Test Coverage

Chat

V2V plugin for ManageIQ.

Purpose

The purpose of this repository is to provide UI infrastructure to ManageIQ for the V2V effort. V2V is an acronym for virtual to virtual, referring to the process of importing virtual machines from one virtualization platform to another.

Current features

  • Adds Compute -> Migration section to ManageIQ.
  • Define infrastructure mappings for migrating disks and lans from a source cluster to a destination cluster
  • Define migration plans for one or more VMs associated with the infrastructure mapping
  • Run a migration plan and observe the migration status for each VM

Technologies Used

Development

See the section on plugins in the ManageIQ Developer Setup

For quick local setup run bin/setup, which will clone the core ManageIQ repository under the spec directory and setup necessary config files. If you have already cloned it, you can run bin/update to bring the core ManageIQ code up to date.

License

The gem is available as open source under the terms of the Apache License 2.0.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

manageiq-v2v's People

Contributors

agrare avatar allenbw avatar aparnakarve avatar bdunne avatar chessbyte avatar d-m-u avatar djberg96 avatar fabiendupont avatar fryguy avatar gtanzillo avatar himdel avatar hyperkid123 avatar jeff-phillips-18 avatar jprause avatar jrafanie avatar kavyanekkalapu avatar mend-bolt-for-github[bot] avatar michaelkro avatar mturley avatar mzazrivec avatar nicklamuro avatar priley86 avatar simaishi avatar skateman avatar zitanemeckova avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manageiq-v2v's Issues

Wire Mapping Wizard APIs into "real" APIs

  • test the responses for clusters/networks/datastores and make sure they are valid
  • test the responses for posting transformation_mappings
  • change mock/dummy urls and remove the action creator exception responses (returning stubs now)

Create the Migration in Progress Cards

This issue will handle creating the UI components for the Migration in Progress Cards.

Subject to UX approval:
These will be using the Utilization Bar Card pattern referenced here:
http://www.patternfly.org/pattern-library/cards/utilization-bar-card/

There is also a PF React issue here for Base Card:
patternfly/patternfly-react#192

The Utilization Bar can be contributed to PF React as well (so I think we should start here for this issue):
patternfly/patternfly-react#193

Whether or not to use redux-form, and "This may not be required if using Redux form" comments

We are using redux-form for now, but there was concern from me and from @priley86 while debugging issues with it that we may want to either replace it with another package or roll our own implementation of form validation with redux (which isn't too much boilerplate).

The issues that prompted that were resolved, so we stuck with it (for now?), but there are still comments reading // This may not be required if using Redux form, so we should resolve those.

Migration Plan Wizard - Step 1

Note that this should not be started until the following is completed:
#30 Stub "Create Migration Plan" Wizard is complete

Implement the first step of the Migration Plan Wizard

9a-createplan-general

This page has a

  • mandatory infrastructure mapping
  • mandatory name
  • optional description.

Next should be disabled until the mandatory input is input.

Note that if there is only a single infrastructure mapping, then the dropdown should be preselected and disabled.

Migration Plan Wizard - Step 2

Note that this should not be started until the following is completed:
#30 (Stub Create Migration Plan Wizard)

*** Note that the below mocks may have been updated - need to updated on 06-Feb ***
9ca-createplan-vms-import
9cb-createplan-vms-import
9cc-createplan-vms-import

Next should be disabled until a file is imported.
Clicking on Import will allow the user to browse for a file (does it have to be CSV?)
Once imported,

  • the VMs will be shown in a read only list.
  • the number of VMs will be displayed.
  • Next will be enabled

The user MAY import another file ( but this will be covered by another Issue )

Wire Plan Wizard APIs into "real" APIs

  • test the responses for /api/service_templates (to create a migration plan) and /api/provision_requests to create a Migration Request
  • change mock/dummy urls and remove the action creator exception responses (returning stubs now)

Create the Migration Plan Wizard

This will involve the following:

    1. create the general step for specifying mapping / description
    1. create the import vm's step for importing vms and validating them if possible
    1. create the results step indicating a migration is in progress

Infrastructure Mapping Wizard / Step 1

Note that this should not be started until the following is completed:
#2 Stub "Create Infrastructure Mapping" Wizard

Implement the first step of the Infrastructure Mapping Wizard

This page has a mandatory name and optional description.
Next should be disabled until the mandatory input is input.

4a-createmapping-general

Migration Plan Wizard - Step 2 - Import another file

Note that this should not be started until the following is completed:
#33 Migration Plan Wizard - Step 2

If a file has already been imported, the Import button remains active.
If the user decides to import another file, post an confirmation message letting them know the list of VMs will be overwritten with the new import.
Once the user confirms, replace the existing list of VMs with the contents of the imported file.
If the user cancels the import, keep the list of existing VMs

Misc post-POC cleanup items

Not sure if these are big enough to deserve individual issues, we can maybe create some for them when we actually get around to them. If anyone thinks any of these in particular should be made their own issues up front, let me know.

  • Step 2 of the Plan Wizard (CSV upload step) uses some basic CSS to provide a hover state, and combines some existing design patterns, but we should give this CSS some designer attention and consider making a File Upload pattern in patternfly core eventually.
  • The modal wizard window is always at a tall fixed height, it would be nice to have it adjust size to match its contents, even if we need to specify a specific pixel height for each step (although reactive CSS would be much nicer).
  • The ModalWizard and ModalWizardBody are good candidates to be moved up to patternfly-react, but we would need to remove the application-specific bit of code near the top.
  • Currently the way we prevent skipping ahead in the wizard with the Step Numbers is a little hacky. We should instead just track the state of the farthestSeenStepIndex and prevent clicking past that.
  • We have some occasional JS console errors, mostly around missing key props in JSX arrays.

Consistent rules across ManageIQ repositories

(If this repo is not supposed to become a ManageIQ repo, please close this issue.)

In all ManageIQ repos, squash + merge is disabled, because we do not want squashed commits. There is huge value in having the whole history, especially when looking for bugs, backporting changes to earlier releases, etc. etc.

We also don't allow editor config files to be checked in, except for a generic .editorconfig which multiple editors can parse. I'm seing .vscode here.

Third, we use yarn not npm, and we explicitly don't check in yarn.lock except in release branches. I'm seeing package-lock.json here.

This repository should follow the same rules.

Migration Plan Wizard - Step 3

Note that this should not be started until the following is completed:
#30 (Stub Create Migration Plan Wizard)

9e-createplan-results

The results page just states that the plan is in progress.

Cancel & Back buttons shown be disabled, and the "Next" button label should change to Close. Close should also have focus.

Clicking on "Close" will close this wizard.

Note that once closed, the Overview page should be updated to include this Migration Plan in progress. (Not part of this Issue)

Stub "Create Migration Plan" Wizard

Simple wizard flow at this point first - so we can enable the other wizard steps to be developed simultaneously.

There are 3 steps in the wizard:

  • General
  • VMs
  • Results

Stub the wizard steps indicators and the wizard back/next in the footer for infra mapping wizard that would be great. Let's just tackle that one first and try the planning wizard next...

Actions and reducers for loading VMs

This maybe doesn't need to hit the API for the POC, just store the user-uploaded VM list.

Associated with the CSV upload and putting it in redux.

Infrastructure Mapping Wizard / Step 5

Note that this should not be started until the following is completed:
#2 (Stub Create Infrastructure Mapping Wizard)
#30 (Stub Create Migration Plan Wizard)

8b-createmapping-results

When status is successful, Cancel & Back buttons shown be disabled, and the "Next" button label should change to Close. Close should also have focus.

Clicking on the "Continue to the plan wizard" link should close this wizard, and invoke the Plan wizard, preselecting the Infrastructure Mapping just created.

Commented-out code

Commented-out code is introduced by #42. We should remove it before merging upstream, but i'm letting it merge for now to unblock the next PR.

Enable drill down to failed migrations from Migrations Completed

Note that this should not be started until the following is completed:
#11 (Create the Migration Completed Cards)

When clicking on the number of failed migrations in a Migration Completed card, show the VMs with associated message.

Design not yet completed - currently 2 possible designs

Infrastructure Mapping Wizard / Step 4

Note that this should not be started until the following is completed:
#26 (Infrastructure Mapping Wizard / Step 2)
#27 (Infrastructure Mapping Wizard / Step 3)

Implement the third step of the Infrastructure Mapping Wizard.

Check with @priley86 on what he's done in the past with a dual pane type selector. We will not be contributing anything to PF for the dual pane selector for now, because of time constraints.

For Step 4,
the user first selects a source cluster from a drop down

Once selected, the rest of the components will be shown in the panel including Source Networks, Target Networks the add mapping button and the mapped tree view component.

The user selects 1 or more Source Networks, and a single Target Networks, and then hits Add Mapping. The Add Mapping button should be disabled until those conditions exist. Upon hitting add mapping, the target cluster should be added as a parent, with the source clusters as children.

Note that Steps 2, 3 & 4 of this wizard will use very similar widgets.

FormField should be moved to a common directory

See @priley86's comment on #42 in FormField.js. He proposes moving

app/javascript/react/screens/App/Overview/screens/formUtilities/FormField.js

to

app/javascript/react/screens/App/common/forms/FormField.js

but I am merging the PR without this to unblock us.

Actions and reducers for migration request

This should include actions + reducers + tests for API interactions around creating a migration request (after the migration plan wizard is completed and a request is created)

Review componentRegistry pattern w/ mIQ Core

In this issue we will follow up on the component registry pattern implemented here (and tested) and ensure it integrates with manageiq-ui-classic. Need to review if any components/containers need to be injected server-side (via mounts). Also need to review if we can support ownProps in the componentRegistry pattern implemented in manageiq-ui-classic.

Infrastructure Mapping Wizard / Step 2

Implement the second step of the Infrastructure Mapping Wizard.

Check with @priley86 on what he's done in the past with a dual pane type selector. We will not be contributing anything to PF for the dual pane selector for now, because of time constraints.

4aa-createmapping-clusters
4b-createmapping-clusters

For Step 2, the user selects 1 or more Source Clusters, and a single Target Cluster, and then hits Add Mapping. The Add Mapping button should be disabled until those conditions exist. Upon hitting add mapping, the target cluster should be added as a parent, with the source clusters as children.

Note that Steps 2, 3 & 4 of this wizard will use very similar widgets.

Associated issues to be completed AFTER this issue :
#27 Infrastructure Mapping Wizard / Step 3
#28 Infrastructure Mapping Wizard / Step 4

To redux-form or not to redux-form

I closed #47 because those comments were removed, but I'm going to leave this general issue open for any discussion about whether or not we should ditch redux-form. Had we started from scratch without it, I believe we would have been done in half the time... but we have sunk enough time into it and gotten it working after much frustration, so I see no immediate need to tear it out before the POC.

But if redux-form looks at me funny one more time I might delete it and rewrite the form validation with redux. It's form validation... it ain't that hard... and it wouldn't be more verbose so much as more explicit. It seems like redux-form decreases, rather than increases, the readability of our code (at least when it's breaking), because it tries to do too much magic. It is very unclear which components are passing what props where and how. Values magically get injected into input fields without a prop, so they can't be selectively overrided. And it's quite poorly documented (well, the docs are pretty, but the one i needed was a broken link).

The 2 big things we get out of redux-form are:

  • Implicit storage of form data in redux (arguable if that is even desired)
  • Pre-written validators for form data (not hard to roll our own, and there are alternatives like https://www.npmjs.com/package/react-validation). But if all we are doing is checking for required fields, it's trivial.

Low priority.. But I've had my 3 strikes with redux-form. I think I'd like to get rid of it in the long run. @priley86 I know you agree... @AparnaKarve I know you disagree. What do you like about redux-form? I bet we can easily emulate the good parts of it with our own code.

Wire Overview into "real" APIs

  • test the responses for /api/transformation_mappings to query all mappings, and /api/service_requests to get the Overview Card statuses
  • change mock/dummy urls and remove the action creator exception responses (returning stubs now)

@jeff-phillips-18 do you know of any others?

Infrastructure Mapping Wizard / Step 3

Note that this should not be started until the following is completed:
#26 (Infrastructure Mapping Wizard / Step 2)

Implement the third step of the Infrastructure Mapping Wizard.

Check with @priley86 on what he's done in the past with a dual pane type selector. We will not be contributing anything to PF for the dual pane selector for now, because of time constraints.

5a-createmapping-datastores
5b-createmapping-datastores
5c-createmapping-datastores
5d-createmapping-datastores

For Step 3,
the user first selects a source cluster from a drop down

Once selected, the rest of the components will be shown in the panel including Source Datastores, Target datastores the add mapping button and the mapped tree view component.

The user selects 1 or more Source datastores, and a single Target datastore, and then hits Add Mapping. The Add Mapping button should be disabled until those conditions exist. Upon hitting add mapping, the target cluster should be added as a parent, with the source clusters as children.

Note that Steps 2, 3 & 4 of this wizard will use very similar widgets.

Associated issue to be completed AFTER this issue :
#28 Infrastructure Mapping Wizard / Step 4

Add Total Source Datastores Info

We need to be able to query for all of the datastores for all source clusters in order to

  1. Get a total count of datastores that need to be mapped
  2. Warn the user about any unmapped source datastores

Please see pictures below

From the PoC Mocks

v2v_poc_-_ux_proposal_20180131b_-_google_slides

v2v_poc_-_ux_proposal_20180131b_-_google_slides

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.