Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Add bach web portal page #1266

Merged
merged 5 commits into from
Sep 13, 2018

Conversation

leochen4891
Copy link
Contributor

@leochen4891 leochen4891 commented Aug 29, 2018

The page is designed to provide:

  1. Services and their port, e.g. namenode on 50070 and hbase on 16010
  2. Useful links, e.g. namenode web UI page.
  3. Files, e.g. conf page tool blacklist file.

Needs review, please don't merge.

also added a json end point "/json"

.rubocop.yml Outdated
@@ -1,3 +1,6 @@
AllCops:
TargetRubyVersion: 2.3
DisplayCopNames: true

Metrics/LineLength:
Max: 80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you delete the entry entirely, the default is 80.

@leochen4891 leochen4891 force-pushed the add_bach_web_info_page branch from 6a9cfdb to 1b0da50 Compare September 11, 2018 19:18
@leochen4891 leochen4891 force-pushed the add_bach_web_info_page branch from bbd1467 to 134b46a Compare September 11, 2018 19:29
@leochen4891
Copy link
Contributor Author

Updated and tested. Ready to review and merge.

@leochen4891 leochen4891 changed the title Add bach web page Add bach web portal page Sep 12, 2018
@leochen4891 leochen4891 merged commit ce160e0 into bloomberg:master Sep 13, 2018
@cbaenziger
Copy link
Member

Hi @leochen4891, do you have any documentation the structure of the Apache file layout after this change?

My attempt to build Chef-BACH seems to be breaking due to an empty node['bach_web']['links']. In trying to fix it up I am not grokking why there is a second bach-web virtual host and bach.html.erb rather than overriding the default index.html.erb in the default virtual host with what we need?

Also, it seems links and files share the same structure; what do you see the difference in the two structures being used for?

@leochen4891
Copy link
Contributor Author

The Apache files layout after this change is to keep bach_bach related files under /var/www/bach/, which contains a sub-dir "files" to expose files.

The reason I didn't override the existing index.html.erb and virtual host is that I was thinking of adding bach_web as a new set of pages, but not necessarily at the top level directory. I would have no objection if you suggest overriding existing index.html.erb and virtual host is a better way.

links and files are all jumps from user's point of view, but conceptually files has physical files sitting in /var/www/bach/files/ while a link can be anything jump-able. I think it should be fine to combine them into links if that would reduce some unneeded complexity.

@cbaenziger
Copy link
Member

The next issue I hit was:

Recipe: bcpc-hadoop::hdfs_web
  * directory[/var/www/bach/files/hdfs] action create
    * Parent directory /var/www/bach/files does not exist, cannot create /var/www/bach/files/hdfs
    ================================================================================
    Error executing action `create` on resource 'directory[/var/www/bach/files/hdfs]'
    ================================================================================

    Chef::Exceptions::EnclosingDirectoryDoesNotExist
    ------------------------------------------------
    Parent directory /var/www/bach/files does not exist, cannot create /var/www/bach/files/hdfs

@leochen4891
Copy link
Contributor Author

leochen4891 commented Sep 24, 2018

The dir /var/www/bach/files is created in bcpc::apache2 and should be prior to bcpc-hadoop::hdfs_web in the run_list.
Can you please take a look at the expanded run_list and check if bcpc-hadoop::hdfs_web is in front of bcpc::apache2 for some reason?

@leochen4891
Copy link
Contributor Author

The cause of the missing directory is worker nodes doesn't need the xxxx_web recipes , and should be fixed by #1276

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants