Giter Site home page Giter Site logo

apache / accumulo-website Goto Github PK

View Code? Open in Web Editor NEW
14.0 19.0 100.0 62.62 MB

Apache Accumulo Website

Home Page: https://accumulo.apache.org

HTML 99.34% CSS 0.16% JavaScript 0.47% Ruby 0.01% Processing 0.01% SCSS 0.02% Dockerfile 0.01%
accumulo big-data asf-site hacktoberfest

accumulo-website's Introduction

Apache Accumulo Website

Apache Accumulo's website is generated from Markdown source (specifically, kramdown style) with Jekyll, using Bundler to manage its gem dependencies.

Development

Custom Liquid Tags

Jekyll uses Liquid to process files before interpreting their Markdown contents. We have extended Jekyll using its plugin mechanism to create custom Liquid tags that make it easier to link to javadocs, properties, and documents.

The source for these tags is at _plugins/links.rb.

Tag Description Options Examples
jlink Creates Javadoc link Link text will be class name by default. Use -f for full package + class name {% jlink -f org.apache.accumulo.core.client.Connector %} {% jlink -f org.apache.accumulo.core.client %}
jurl Creates Javadoc URL None {% jurl org.apache.accumulo.core.client.Connector %}
plink Creates Property link Assumes server property by default. Use -c to link to client properties. Accepts server property prefixes (i.e table.\*) {% plink -c instance.name %}
purl Creates Property URL Default is server property. Use -c to link to client properties. Accepts server property prefixes (i.e table.\*) {% purl instance.volumes %}
dlink Creates Documentation link None {% dlink getting-stared/clients %}
durl Creates Documentation URL None {% durl troubleshooting/performance %}
ghi GitHub issue link None {% ghi 100 %}
ghc GitHub code link Branch defaults to gh_branch setting in _config.yml. Override using -b {% ghc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java %} {% ghc -b 1.10 README.md %}
jira Jira issue link None {% jira ACCUMULO-1000 %}

Updating Property Documentation for Releases

Building Accumulo generates server-properties*.md and client-properties*.md. To regenerate these, do the following.

ACCUMULO_SITE_CLONE=<accumulo website clone location, with main branch checked out>
ACCUMULO_CLONE=<accumulo clone location>
cd "$ACCUMULO_CLONE"
mvn package -DskipTests
cp ./core/target/generated-docs/*.md "$ACCUMULO_SITE_CLONE"/_docs-2/configuration/

Local Builds for Testing

Setting up Your Jekyll/Bundler Environment

Ruby and RubyGems are required to use Jekyll and Bundler, so first make sure you have those on your machine.

If you are using an OS packaged version of Ruby, you may also need to install the ruby-dev (Ubuntu) or ruby-devel (Fedora) package as well to build any native code for gems that are installed later. Installing these will also ensure your system's RubyGems package is installed. Depending on your OS, you may also need other packages to install/build gems, such as ruby-full, make, gcc, nodejs, build-essentials, or patch.

Once Ruby, RubyGems, and any necessary native tools are installed, you are ready to install Bundler to manage the remaining RubyGem dependencies. Bundler is included in Ruby 2.6 and later as a default gem, so installing it may not be needed.

Because we use Bundler to install specific versions of gems, it is not recommended to use an OS packaged version of gems other than what comes built-in. If you are using an OS packaged version of Ruby, it is strongly recommended to avoid sudo when installing additional gems, in order to avoid conflicting with your system's package-managed installation. Instead, you can specify a GEM_HOME directory for installing gems locally in your home directory. You can do this in your $HOME/.bashrc file or other appropriate place for your environment:

# in .bashrc
export GEM_HOME=$HOME/.gem/ruby

With Ruby installed on your machine, you can install Bundler using the command below:

# not necessary in Ruby >2.6, since it is a default gem since 2.6
gem install bundler

Next, use Bundler to install Jekyll and other dependencies needed to run the website (this command assumes your current working directory is your clone of this repository with the main branch checked out, because that's where the Gemfile dependency list exists).

bundle install

Testing with the Built-in Jekyll Webserver

The command to serve the site contents using Jekyll's built-in webserver is as follows (this webserver may behave differently than apache.org's servers).

bundle exec jekyll serve -w

You do NOT need to execute a bundle exec jekyll build command first, as the serve command is sufficient to both build the site and serve its contents. By default, it will also try to re-build any pages you change while running the webserver, which can be quite useful if trying to get some CSS or HTML styled "just right".

Jekyll will print a local URL where the site can be viewed (usually, http://0.0.0.0:4000/).

Testing using Docker environment

A containerized development environment can be built using the local Dockerfile.

A containerized development environment can be built using the local Dockerfile. You can build it with the following command:

docker build -t webdev .

This action will produce a webdev image, with all the website's build prerequisites preinstalled. When a container is run from this image, it will perform a jekyll serve command with the polling option enabled, so that changes you make locally will be immediately reflected.

When you run a container using the webdev image, your current working directory will be mounted, so that any changes made by the build inside the container will be reflected in your local workspace. This is done with the -v flag. To run the container, execute the following command:

docker run -d -v "$PWD":/mnt/workdir -p 4000:4000 webdev

While this container is running, you will be able to review the rendered website in your local browser at http://127.0.0.1:4000/.

Shell access can be obtained by overriding the default container command.

This is useful for adding new gems, or modifying the Gemfile.lock for updating existing dependencies.

When using shell access the local directory must be mounted to ensure the Gemfile and Gemfile.lock updates are reflected in your local environment so you can create a commit and submit a PR.

docker run -v "$PWD":/mnt/workdir -it webdev /bin/bash

Publishing

Changes pushed to our main branch will automatically trigger Jekyll to build our site from that branch and push the result to our asf-site branch, where they will be served on our production site.

accumulo-website's People

Contributors

alerman avatar arvindshmicrosoft avatar billierinaldi avatar brianloss avatar cjmctague avatar cshannon avatar ctubbsii avatar ddanielr avatar dhutchis avatar dlmarion avatar domgarguilo avatar edcoleman avatar etseidl avatar foster33 avatar hkeebler avatar ivakegg avatar jmark99 avatar joshelser avatar jzgithub1 avatar karthick-rn avatar keith-turner avatar kevinrr888 avatar lstav avatar manno15 avatar mikewalch avatar milleruntime avatar mjwall avatar phrocker avatar pircdef avatar slackwinner avatar

Stargazers

 avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

accumulo-website's Issues

State which Java versions are supported

Issue

There needs to be some documentation on which Java versions are supported.

Background

I just tried running the tour, but I'm getting an exception. I suspect the problem is that I'm using Java >= 9, (in my case, Java 11), and there were changes to the way class loaders worked?

I also tried updating the accumulo.version to 1.9.2 in the pom.xml but that had no effect.

Here's the last few lines of my output (no quiet mode):

Command

$ mvn clean compile exec:java

Output

[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ accumulo-tour ---
Running the Accumulo tour. Having fun yet?
[WARNING]
java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:294)
    at java.lang.Thread.run (Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Unknown classloader type : jdk.internal.loader.ClassLoaders$AppClassLoader
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.getClasspath (MiniAccumuloClusterImpl.java:270)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl._exec (MiniAccumuloClusterImpl.java:288)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl._exec (MiniAccumuloClusterImpl.java:364)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterControl.start (MiniAccumuloClusterControl.java:161)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterControl.start (MiniAccumuloClusterControl.java:137)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterControl.start (MiniAccumuloClusterControl.java:69)
    at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.start (MiniAccumuloClusterImpl.java:571)
    at org.apache.accumulo.minicluster.MiniAccumuloCluster.start (MiniAccumuloCluster.java:70)
    at tour.Main.main (Main.java:29)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:294)
    at java.lang.Thread.run (Thread.java:834)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.726 s
[INFO] Finished at: 2019-01-25T16:09:43-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:java (default-cli) on project accumulo-tour: An exception occured while executing the Java class. null: InvocationTargetException: Unknown classloader type : jdk.internal.loader.ClassLoaders$AppClassLoader -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Java version:

$ java -version
java version "11.0.1" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)

Maven version:

$ mvn -v
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T14:41:47-04:00)
Maven home: /usr/local/Cellar/maven/3.6.0/libexec
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.14.2", arch: "x86_64", family: "mac"

Clean up css files and inline styles

There are a lot of places in the css files that can be cleaned up and/or removed.

Also, there are a lot of inline styles that could be replaced with bootstrap classes which would clean things up.

Create 2.0 upgrade documentation

Create step-by-step instructions to help users move from 1.9 to 2.0.

To create these instructions, it might be helpful to run Accumulo 1.9, stop it, and write up all instructions necessary to start up instance again as Accumulo 2.0.

These instructions should be linked to from 2.0.0 release notes

Update javascript and css resources

Several libraries we use for the website are a bit out of date and could be updated. Here's a list of some:

  • Bootstrap (currently using 3.3.7)
  • Font Awesome (currently using 4.0.3)
  • DataTables (currently using 1.10.12 based on jQuery 2.2.3)
  • jQuery (currently using 2.2.4)

Edit:
The above dependencies are all imported in default.html. The search page imports its own dependencies that need updating:

  • lunr
  • jquery

Update site to accommodate 3.x documentation

The current docs on the website are specifically 2.x docs, and 3.0.0 removes and changes things, so that we can't just update the docs overwriting what is there, like we could with backwards-compatible 2.x updates. We can either redesign the common docs to allow version-specific documentation, or we can copy over the whole Jekyll docs-2.x collection for 3.x and put them in a different directory. If we do that, we'll have to update the Jekyll ruby plugin to support the convenience links that we had before that currently only work with 2.x.

This involves understanding how the _config.yml file properties, the _docs-2/ collection, the generated client and server properties in _docs-2/configuration/ the _docs-2/apidocs, and the _plugins/links.rb all work together, and updating it all to support both the 2.x docs and the 3.x docs.

Update new PMC members on people page

@hkeebler and @alerman were recently voted as committers/PMC members to Accumulo.

I'm creating this issue to encourage them to use their new privileges to commit directly to an Accumulo repository, and the easiest first commit is normally to each move themselves from the contributors section to the PMC section of the people page on the website.

Broken links in docs

There are some broken links in the docs that need updating/fixing. I briefly looked through some of the pages and there are probably others but here are a few that I found:

Need a chapter on Yielding

Since the yielding feature was added back in release 1.9.0, we have been missing a chapter on how to use it.

Provide space on "people" page for Emeritus PMC members

At least one person on our PMC is now Emeritus (for that role, but remains a committer). The "people" page needs to be updated to be able to mark such individuals as Emeritus. Right now, it lists all PMC and committers in one big list. There are probably several different design options. Maybe using datatables could work to organize the list of contributors/committers/PMC members/Emeritus PMC members? Or just a separate "Committers / Emeritus PMC Members" section.

If anybody is interested in doing this, they could also suggest a similarly styled update over on the Fluo project for apache/fluo-website#216

Create a stable way to link to property documentation

To support linking to property documentation from Javadocs, it would be nice if the website offered stable way to do this. For example the following link could show the docs for the table.scan.dispatcher property.

https://apache.accumulo.org/docs/property/table.scan.dispatcher

Could start off with this redirecting to the docs for the latest version and change the behavior over time.
For example, it could link to the the docs for different versions of a prop and show the description from the latest version.

Consider updating Accumulo Tour to use new JShell Feature

Consider re-working the Accumulo Tour to use the newer JShell feature.

An advantage would be that user could immediately start exercising Accumulo features without having to set up a development environment since work would be done within the Accumulo Shell. It would involve users setting up an Accumulo instance either via Fluo-Uno, Accumulo MiniCluster, or some other means.

The existing Tour could remain to allow users either option if desired.

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.