Giter VIP home page Giter VIP logo

blue-horizon's People

Contributors

arbulu89 avatar bear454 avatar dependabot[bot] avatar jesusbv avatar mallozup avatar rjschwei avatar stefanotorresi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blue-horizon's Issues

v1.0.0: application fails to start due to production dependency on Uglifier gem`

In a comical series of events...

  • I added prettier for styling JS.
  • prettier introduced ES6 syntax.
  • The sprockets stack cannot handle ES6 without modifying the production environment to set options on Uglifier [1]
  • Doing so changes the production environment to require Uglifier, which we do not include (as all assets are precompiled in the source tarball)
  • So... Rails fails to start in production mode D:

[1]

rails aborted!
Uglifier::Error: Unexpected token: name (endIndex). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).

Download action fails

I, [2020-02-13T23:20:45.624277 #697]  INFO -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1] Processing by DownloadController#download as HTML
D, [2020-02-13T23:20:45.625076 #697] DEBUG -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1]   Source Load (0.3ms)  SELECT "sources".* FROM "sources" ORDER BY "sources"."filename" ASC
I, [2020-02-13T23:20:45.627853 #697]  INFO -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1] Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms)
F, [2020-02-13T23:20:45.628264 #697] FATAL -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1]   
F, [2020-02-13T23:20:45.628296 #697] FATAL -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1] NameError (uninitialized constant DownloadController::Zip):
F, [2020-02-13T23:20:45.628310 #697] FATAL -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1]   
F, [2020-02-13T23:20:45.628326 #697] FATAL -- : [b39416f8-7971-4b8c-ac65-ebb2688a63b1] app/controllers/download_controller.rb:25:in `zip_files'

"aditional data" step needs to be revisited

First of all term "Additional data" hard to apply to data which you entering there . Things like subscription ID , client ID and secret are more like core elements ( at least from my understanding ) .
So maybe we should just rename "additional data" to more accurate name . Another option would be to group fields there in smaller groups/steps and split it to several steps

Concurrent logins are not supported

  1. Proceed through all steps till Deploy page
  2. Start Deploy proceed
  3. While deploy is running start second browser instance and login
  4. In second browser instance try to navigate to Plan page
    ==> despite on-going "terraform apply" , navigation to Plan page will trigger "terraform plan" which would ruin on-going "terraform apply"

Expected: there could be few possible solutions :

  1. Block any attempts to login of second user
  2. Allow more than one login but second logins happening in read-only mode
  3. Smart handling of concurrent navigation of two ( or more ) user between phases

Click on "Plan" button erased all inserted data and display error message

  1. Insert all needed data on "variables" page
  2. Click on "Plan" button
    ==> all inserted data will be erased and error message will be displayed

Note: it is clear that reason for this is that before click on "Plan" you need to save data by clicking on "Save plan". But it is not obvious also error message does not explain anything and what is more critical data entered by user is erased

"Additional data" steps should be more supportive to user

every field when it possible can try to guess what user might enter and try to give a hint to user :

  • most probably user will enter same Subscription ID as for VM where blue-horizon is running. is there a way to get Subscription ID at run-time ?
  • Also if we will ask user to enter subscription ID , client ID and secret beforehand . We might get some possible values list for some of the fields from account which user will use
  • Locations list - I think you can get it somewhere from Azure . Or it is even static thing ?
  • K8s version has a hint asking user to run some command . Can we run it for him/her and get back with supported versions list ?
  • DNS Zone name - can we get it from Azure ?

Long-running jobs may report an error in the UI after completion.

The log shows that terraform did apply successfully, but in the next AJAX cycle, the error dialog is displayed:

Screenshot from Peek 2020-03-05 15-59 webm

Screenshot from Peek 2020-03-05 15-59 webm - 1

The action button then stays in the running state for about another minute. When it finally exits the 'runnning' state, the "Next Steps" are not enabled. I suspect this is because the last request timed out instead of completing successfully.

Need to do verifications of DNS zone before passing it to terraform

During testing of AKS I got into two traps :

  1. Provide DNS record which is not publicly resolvable . This leads to failure only in deploy phase in cert manager step. Error which you will get require some level of expertise to figure out what is real cause
  2. Provide resource group which does not contain mentioned DNS Zone . This leads to a failure to reach UAA because terraform failed to configure sub-domain . Again some level of expertise required to figure out real root cause

Both scenarios easy to cover before even doing plan phase .

  1. Simple dig on provided DNS name will allow to give user human readable error explaining the problem
  2. This is more complicated but still having Azure credentials we should be capable to verify if specified DNS Zone actually available in certain resource group

Doing a typo in variable name in expert mode making fully killing blue-horizon

  1. Enter expert mode
  2. Do some "mistake" ( just type random text anywhere ) and save this modification
    ==> on trying to switch to different file or any other action you will end up in 500 error screen

in logs you can see this :

E, [2020-06-03T08:57:36.487804 #644] ERROR -- : Failed while running 'validate'.
Error: Reference to undeclared local value

  on cert-manager.tf line 11, in resource "null_resource" "cert_manager_setup":
  11:       KUBECONFIG     = local.kubeconfig_file_pathddsdsd

A local value with the name "kubeconfig_file_pathddsdsd" has not been
declared.

"additional data" - cluster labels have sub-optimal flow

Every time you enter new key at "Cluster Label" section it cause info section appear at the top of the page saying that value successfully added , this cause web page to scroll to the top . So if you need to enter few values you will need to scroll back to "Cluster Label" after entering every key

Allow empty options in the variables page

Hi all,

I'm doing a small POC with this project to see how we can integrate our SAP/HA deployment project: https://github.com/SUSE/ha-sap-terraform-deployments

I have succeeded deploying the project but I have done some workarounds for that. Besides that, the major inconvenience is that I cannot let the variables as empty values in the variables configuration as all of them are required. We use many variables with this logic. For example, we ask for a resource group name, but if it's not provided (empty string) we create a new one. Things like that.

Would it be possible to allow empty strings for this purpose?

Terraform provider plugins need to have certain version

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.local: version = "~> 1.4"
* provider.null: version = "~> 2.1"
* provider.random: version = "~> 2.2"

need to define versions in tf files

Expert mode don't need to do verifications after each file switch

Currently selecting new file take some time because after each change there is some validation running . This makes editing session really time consuming and not pleasant . But ofc I clearly see reasons why we need this . To keep CAP repo in workable state but give user more comfortable environment :

  • on file modification of any file not directly save changes but create some temp modified copy/patch
  • after user did all needed changes he/she suppose to press some kinda of "Submit" button which will do validation and will apply changes in case all valid
  • during one "modification session" user may switch between files faster because we not doing any checks

Need to create kubeconfig

kubeconfig file is important for further usage of created cluster . At the end of terraform deploy we getting it in UI . So we could just consume it and save as separate file . Later we could allow user to download it or as part of archive which generated after each deploy or as single file

[suse-cap-deploy-byos-v20200526] deploy failed with time out waiting for the condition

After pressing "Apply" button in deploy step it end up with following error :

helm_release.cert-manager: Still creating... [4m10s elapsed]
helm_release.cert-manager: Still creating... [4m20s elapsed]
helm_release.cert-manager: Still creating... [4m30s elapsed]
helm_release.cert-manager: Still creating... [4m40s elapsed]
helm_release.cert-manager: Still creating... [4m50s elapsed]
helm_release.cert-manager: Still creating... [5m0s elapsed]
Error: timed out waiting for the condition

  on cert-manager.tf line 16, in resource "helm_release" "cert-manager":
  16: resource "helm_release" "cert-manager" {

Password variables

Variables with 'password' in the description should be rendered with the password input type.

plan & deploy pages need an introductory step

When I visit the 'Plan' page there is a delay while terraform plan is run in the background. The Plan page should include an explanation of what will occur, and provide an action point (link/button) to execute planning.

Same for the 'Deploy' page.

terraform tmp files not cleaned up on creating a new plan

If the terraform files under vendor/sources are changed, running through the UI and creating a new plan may error out with message such as:

Error: Reference to undeclared resource
  on k8sresources.tf line 4, in provider "kubernetes":
   4:     host                   = "${azurerm_kubernetes_cluster.k8s.kube_config.0.host}"

A managed resource "azurerm_kubernetes_cluster" "k8s" has not been declared in
the root module.

deleting the contents of blue-horizon/tmp/terraform resolves the problem, but its not obvious to the user that they should do so. Ideally blue-horizon should automatically clean-up the prior content before creating each new plan.

Automatic scroll in deployment stage

I have been running some custom deployments with the project, and I have noticed that during the deployment the execution logs are not being scrolled automatically. This is quite annoying as I need to be scrolling down all the time.

Could we have some option to set the automatic scrolling?

password check is case sensitive

Fields with description including 'password' are treated as password fields, but descriptions including 'Password' are not.

Found in v0.2.0

Unit tests fail if they are executed with other terraform than 0.12.24

Hi all,

I have been facing some issues running the unit tests in my system. I have terraform 0.12.26 installed in my system (it is not the latest one neither) and a couple of UT fail because they expect 0.12.24. This is quite annoying, as it would force me to have this alternative terraform version just to run the test.

The failing tests are in features/plan_spec.rb

Error happened during "terraform apply" does not reach UI

( in "Additional Data" use account which does not have enough quota to create a cluster )

  1. From "Plan" step press "Deploy"
    => in deploy page you will see terraform output but only until terraform will fail with "QuotaLimitExceeded" . Error itself will not be displayed . To figure out what happened you need to use "Download" and find "ruby-terraform.log" inside

Expected: we might show "ruby-terraform.log" in deploy page in case some error happened

Handle authorization and auto-detect machine-assigned permissions.

blue-horizon should be able to detect if it is running in a proper machine security context (e.g. AWS IAM or Azure MSI) and pass along credentials to a predefined set of terraform variables.

In the event that the proper security context is not detected, a form should be presented requiring appropriate credentials.

Dirty state in expert mode

Will be nice to have some kind of indication which files user actually modified in expert mode ( a star near file name , different font color etc. )

Next level will be also ability to see full diff of all changes made by user ( a button generating a patch file maybe ? )

Add some message when the deployment is done properly

Hi all,

After running the deployment successfully, I miss some kind of message saying that everything went fine, more than just the plain terraform messages. Otherwise, it's not crystal clear that everything went fine.

wrapup page should rely on actual results of deploy

After deploy actually fail with error you still see same page which recommends you how to proceed with working cluster.

Not sure what would be expected behavior here . I see two main possibilities :

  1. Not allow user to switch to wrapup page at all
  2. Have second version of this page saying something "Sorry something went wrong try to find solution here or there "

"Plan" - not call "terraform plan" for same data

  1. Enter all needed info into "Additional data" step
  2. Press "Plan" => this will cause execution of terraform plan
  3. Review JSON and press "Additional data" to get back
  4. Not change anything and press "Plan" again
    => terraform plan will be triggered one more time

Expected: the fact that there is no changes in input data can be easily tracked , in this case no point to make user wait until terraform will generate exactly the same output , so we can just skip execution of terraform plan and show old JSON version

ruby-terraform.log misses deploy output if there is a problem

When running terraform apply via the Deploy step, errors can occur, and blue-horizon does a nice job of showing there was an error, and listing the terraform log in the UI, but in this instance, the log does not get written back to disk, in the tmp/terraform/ruby-terraform.log .

I assume the captured loggers are getting closed unexpectedly when there is an error.

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.