Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
feat(data-catalog): Adding Hue
Browse files Browse the repository at this point in the history
  • Loading branch information
tumido committed Nov 11, 2020
1 parent 58e1d23 commit bfb99e2
Show file tree
Hide file tree
Showing 17 changed files with 709 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Cloudera Hue

Deploys the Cloudera Hue server allowing data exploration on Hive and S3 buckets.

### Folders

There is one main folder in the Hue component `hue` which contains the kustomize manifests.

### Installation

To install Hue add the following to the `kfctl` yaml file.

```yaml
- kustomizeConfig:
repoRef:
name: manifests
path: hue/hue
name: hue
```
38 changes: 38 additions & 0 deletions hue/hue/base/hive-site-xml-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
apiVersion: v1
kind: Secret
metadata:
name: hue-hive-site-xml
type: Opaque
stringData:
hive-site.xml: |
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hive.server2.transport.mode</name>
<value>binary</value>
<description>Server transport mode. binary or http.</description>
</property>
<property>
<name>hive.server2.thrift.http.port</name>
<value>10000</value>
<description>Port number when in HTTP mode.</description>
</property>
<property>
<name>fs.s3a.awsAccessKeyId</name>
<value>$(s3_access_key_id)</value>
</property>
<property>
<name>fs.s3a.awsSecretAccessKey</name>
<value>$(s3_secret_access_key)</value>
</property>
<property>
<name>fs.s3a.endpoint</name>
<value>$(s3_endpoint)</value>
</property>
</configuration>
28 changes: 28 additions & 0 deletions hue/hue/base/hue-db-init-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: batch/v1
kind: Job
metadata:
name: hue-db-init
spec:
parallelism: 1
completions: 1
template:
metadata:
name: hue-db-init
spec:
containers:
- name: db-init
image: hue
command: ["build/env/bin/hue", "migrate"]
imagePullPolicy: Always
volumeMounts:
- name: "hue-ini"
mountPath: /hue/desktop/conf/
volumes:
- name: "hue-ini"
secret:
secretName: hue-ini
items:
- key: hue.ini
path: hue.ini
restartPolicy: OnFailure
70 changes: 70 additions & 0 deletions hue/hue/base/hue-dc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
apiVersion: v1
kind: DeploymentConfig
metadata:
name: hue
spec:
selector:
deploymentconfig: hue
template:
metadata:
labels:
deploymentconfig: hue
spec:
containers:
- name: hue
image: hue
command: ["build/env/bin/hue", "runcpserver"]
imagePullPolicy: Always
resources:
requests:
cpu: 300m
memory: 500Mi
limits:
cpu: 500m
memory: 1Gi
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: hue-secret
key: s3_access_key_id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: hue-secret
key: s3_secret_access_key
volumeMounts:
- name: "hue-ini"
mountPath: /hue/desktop/conf/
- name: "hive-site-xml"
mountPath: /etc/hive/conf/
livenessProbe:
failureThreshold: 4
httpGet:
path: /
port: 8000
scheme: HTTP
periodSeconds: 30
initialDelaySeconds: 300
successThreshold: 1
timeoutSeconds: 5
restartPolicy: Always
volumes:
- name: "hue-ini"
secret:
secretName: hue-ini
items:
- key: hue.ini
path: hue.ini
- name: "hive-site-xml"
secret:
secretName: hue-hive-site-xml
items:
- key: hive-site.xml
path: hive-site.xml
replicas: 1
triggers:
- type: ConfigChange
strategy:
type: Rolling
179 changes: 179 additions & 0 deletions hue/hue/base/hue-ini-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
apiVersion: v1
kind: Secret
metadata:
name: hue-ini
type: Opaque
stringData:
hue.ini: |
[desktop]
# Hide unused apps
app_blacklist=impala,security,jobbrowser,jobsub,pig,hbase,sqoop,zookeeper,spark,oozie,search
secret_key=thisISaSECRET_1234
http_host=0.0.0.0
http_port=8000
is_hue_4=true
time_zone=America/Los_Angeles
django_debug_mode=false
dev=false
database_logging=false
send_dbug_messages=false
http_500_debug_mode=false
[[django_admins]]
[[custom]]
[[ldap]]
[[[users]]]
[[[groups]]]
[[[ldap_servers]]]
[[vcs]]
[[database]]
engine=django.db.backends.mysql
host=hue-mysql.$(namespace).svc
port=3306
user=$(database_user)
password=$(database_password)
name=$(database_name)
[[session]]
[[smtp]]
host=localhost
port=25
user=
password=
tls=no
[[kerberos]]
[[oauth]]
[[oidc]]
[[metrics]]
[notebook]
[[interpreters]]
[[[hive]]]
name=Hive
interface=hiveserver2
[[[impala]]]
name=Impala
interface=hiveserver2
[[[sparksql]]]
name=SparkSql
interface=hiveserver2
[[[text]]]
name=Text
interface=text
[[[markdown]]]
name=Markdown
interface=text
[dashboard]
is_enabled=true
has_sql_enabled=true
has_query_builder_enabled=true
has_report_enabled=true
[[engines]]
[[[sql]]]
analytics=true
nesting=false
[[[hive]]]
analytics=true
nesting=true
[beeswax]
hive_server_host=thriftserver.$(namespace).svc
hive_server_port=10000
auth_username=hue
auth_password=password
hive_conf_dir=/etc/hive/conf
[[ssl]]
[metastore]
enable_new_create_table=true
force_hs2_metadata=false
[impala]
[[ssl]]
[spark]
[oozie]
[filebrowser]
[pig]
[sqoop]
[proxy]
[hbase]
[search]
[libsolr]
[indexer]
[jobsub]
[jobbrowser]
[security]
[zookeeper]
[[clusters]]
[[[default]]]
[useradmin]
[[password_policy]]
[liboozie]
oozie_url=
[aws]
[[aws_accounts]]
[[[default]]]
access_key_id=$(s3_access_key_id)
secret_access_key=$(s3_secret_access_key)
is_secure=$(s3_is_secure)
region=$(s3_region)
host=$(s3_endpoint)
calling_format=boto.s3.connection.OrdinaryCallingFormat
allow_environment_credentials=false
[libsentry]
[libzookeeper]
[librdbms]
[[databases]]
[libsaml]
[libopenid]
[liboauth]
[kafka]
[[kafka]]
[metadata]
[[optimizer]]
[[navigator]]
Loading

0 comments on commit bfb99e2

Please sign in to comment.