Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding all installation options #173

Closed
wants to merge 184 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
130e504
initial gui installer
rizarsyi Jun 23, 2020
7605a37
install Flask
rizarsyi Jun 28, 2020
d32dc14
add gui-install command
rizarsyi Jun 28, 2020
cfc9125
install wizard for license, gluu version, deployment arch, namespace …
rizarsyi Jun 28, 2020
c96c422
fix conflict merge
rizarsyi Jun 28, 2020
54c4a04
Fix namings and keys
moabu Jun 29, 2020
9ae48dc
Remove unused import
moabu Jun 29, 2020
9186568
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Jul 1, 2020
39af4a8
Merge branch '4.2' of github.com:rizarsyi/cloud-native-edition into 4.2
rizarsyi Jul 1, 2020
8d5b35d
add basic gluu_gateway and install jackrabbit forms
rizarsyi Jul 1, 2020
ea95f2b
adjust form style
rizarsyi Jul 1, 2020
ad5023d
add alert for jackrabbit password
rizarsyi Jul 1, 2020
2c8d0a1
adjust style gluu gateway form
rizarsyi Jul 1, 2020
4b08d78
jackrabbit input settings
rizarsyi Jul 1, 2020
121f059
prevent assignment error
rizarsyi Jul 1, 2020
48030ac
Fix conflict
moabu Jul 2, 2020
e183a34
Merge branch '4.2' into 4.2
moabu Jul 2, 2020
069dbbd
Load favicon
moabu Jul 2, 2020
1fd4156
Missing definition for next_step in gluu_gateway
moabu Jul 2, 2020
ef86f34
Add favicon.ico
moabu Jul 3, 2020
125e6d5
install flask-wtf, email-validator
rizarsyi Jul 7, 2020
e0bf0e3
implement wtforms
rizarsyi Jul 8, 2020
540e7bd
update license agreement form
rizarsyi Jul 8, 2020
3c2c72d
implement wtforms on gluu version form
rizarsyi Jul 8, 2020
5c566e0
implement wtforms on deployment arch form
rizarsyi Jul 8, 2020
177e671
implement wtforms on gluu namespace and gluu gateway forms
rizarsyi Jul 8, 2020
32815a5
update install jackrabbit form and add settings form
rizarsyi Jul 8, 2020
952a2ad
move debug param to config
rizarsyi Jul 8, 2020
4f123db
Fix validator types
moabu Jul 9, 2020
ff540cb
Sync
moabu Jul 9, 2020
d3dc1d9
Fix errors
moabu Jul 9, 2020
5017ff7
Merge branch '4.2' into 4.2
moabu Jul 13, 2020
4442233
add forms
rizarsyi Jul 15, 2020
b7ac97f
set update to json file on each form
rizarsyi Jul 15, 2020
dd0fedb
remove required validation for gmail_account field
rizarsyi Jul 15, 2020
d364b06
update volume type form input
rizarsyi Jul 15, 2020
09e30df
add couchbase multi cluster form
rizarsyi Jul 15, 2020
0d6d136
add cache type form
rizarsyi Jul 15, 2020
e48af3f
volume type form script
rizarsyi Jul 15, 2020
d2ee299
update app config
rizarsyi Jul 15, 2020
0454530
Fix sterilization error
moabu Jul 15, 2020
90616f8
Abstract CSS classes
moabu Jul 16, 2020
94ccda4
Update styles.css
moabu Jul 16, 2020
626bbb1
Include bootstrap 4.5
moabu Jul 16, 2020
8c93c25
Update css style
moabu Jul 16, 2020
b7a050a
customize design
moabu Jul 17, 2020
7ca7ab3
load and merge settings file if exist
rizarsyi Jul 20, 2020
a04d9bd
change agreement/license input using checkbox
rizarsyi Jul 20, 2020
a05a9de
add custom validator, required if field equal to
rizarsyi Jul 20, 2020
dbbf9ef
update install jackrabbit form
rizarsyi Jul 20, 2020
7efa3c5
update optional service form style
rizarsyi Jul 20, 2020
efb7f39
update cache type form input process
rizarsyi Jul 20, 2020
508f693
update error validation display
rizarsyi Jul 20, 2020
2e30ab2
update redis form script
rizarsyi Jul 20, 2020
a3ff11d
ignore browser validation
rizarsyi Jul 20, 2020
4ef5b1b
fix typo
rizarsyi Jul 20, 2020
45a4c46
tidy up, line length
rizarsyi Jul 20, 2020
4016232
add settings manipulator
rizarsyi Jul 22, 2020
af300b6
show hide pasword input text
rizarsyi Jul 22, 2020
306d64a
use PasswordInput widget instead of passwordField to populate passwor…
rizarsyi Jul 22, 2020
0cd78af
add couchbase setup
rizarsyi Jul 24, 2020
bcac0b6
define dynamic field values for app_volume_type and ldap_jackrabbit_v…
rizarsyi Jul 24, 2020
96bf893
import secure_filename function
rizarsyi Jul 24, 2020
4ae7e7a
fix prompt gke input settings
rizarsyi Jul 24, 2020
41fbb11
fix prompt settings input
rizarsyi Jul 24, 2020
0489cbd
add config setting step
rizarsyi Jul 24, 2020
76f5ac3
update couchbase form script
rizarsyi Jul 24, 2020
e6c968a
fix typo
rizarsyi Jul 24, 2020
0e616a2
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Jul 24, 2020
4efaf68
add couchbase and ldap backup form setting
rizarsyi Jul 24, 2020
7e70581
update password fields on config form
rizarsyi Jul 24, 2020
2a8d605
add image name tags form
rizarsyi Jul 25, 2020
4b01625
Fix Typo
rizarsyi Jul 26, 2020
1420ebd
set validator to Optional when doesn't meet with condition
rizarsyi Jul 26, 2020
de79ee3
add password requirements validator
rizarsyi Jul 26, 2020
af5a3f0
fix typo
rizarsyi Jul 26, 2020
9b541f1
add form replica settings
rizarsyi Jul 26, 2020
f9d6f73
add form storage setting
rizarsyi Jul 26, 2020
6f181c1
add setting summary page and confirmation params
rizarsyi Jul 26, 2020
6c3bf22
fix selecting dynamic value of app_volume_type
rizarsyi Jul 26, 2020
f63ad29
override validator based on condition
rizarsyi Jul 26, 2020
fd14d23
remove unecessary code
rizarsyi Jul 26, 2020
417f001
pep fix
rizarsyi Jul 27, 2020
deda188
remove unnecessary check
moabu Jul 27, 2020
b9c8858
Typos
moabu Jul 27, 2020
71cb9a0
Add wizard step and title
rizarsyi Jul 29, 2020
d1938f4
Add a progress bar
rizarsyi Jul 29, 2020
5891f5e
discard progress bar
rizarsyi Jul 29, 2020
56a68bb
add couchbase calculator form
rizarsyi Aug 3, 2020
59f844d
fix show hide static volume ids and disk uris option
rizarsyi Aug 3, 2020
65e625b
add navigation button to previous step
rizarsyi Aug 3, 2020
e1bbfd9
fix app_volume_type form next step url
rizarsyi Aug 3, 2020
cf9e782
fix couchbase form next step
rizarsyi Aug 3, 2020
a29f54a
fix typos
rizarsyi Aug 3, 2020
889287c
add password generator for each password field as default value
rizarsyi Aug 5, 2020
d27fdbd
show test environment description when selector value is Y
rizarsyi Aug 5, 2020
fffd71c
fix number of replicas is not appearing for all service selected
rizarsyi Aug 5, 2020
dac3fde
fix table with overlapping width
rizarsyi Aug 5, 2020
cc96bea
add a description on password field
rizarsyi Aug 5, 2020
b2debf1
Fix show/hide or enable/disable fields based on selected services
rizarsyi Aug 5, 2020
9951f69
handle unused form fields by deleting before displaying the form
rizarsyi Aug 5, 2020
9d03220
breakdown codes between main app and views
rizarsyi Aug 6, 2020
fd917dc
fix typos
rizarsyi Aug 6, 2020
1c09f9c
re-structure gui installer project
rizarsyi Aug 6, 2020
d11b60d
add entry points for gui installer command
rizarsyi Aug 6, 2020
3e2de6d
update blueprint templates path
rizarsyi Aug 7, 2020
0d2ac25
Merge remote-tracking branch 'upstream/4.2' into 4.2
rizarsyi Aug 7, 2020
01c4a10
flake8 fixes
rizarsyi Aug 7, 2020
ce98fed
remove unused code
rizarsyi Aug 7, 2020
deb1150
adding kustomize install after configure settings.json finished
rizarsyi Aug 19, 2020
e725200
Merge branch '4.2' into 4.2
moabu Aug 24, 2020
49a6bb9
Multiple fixes.
moabu Aug 24, 2020
afb907a
Update settings.py
moabu Aug 25, 2020
891f21f
define default password length
rizarsyi Aug 28, 2020
85c3ce1
update jackrabbit cluster mode
rizarsyi Aug 28, 2020
ff4cf44
Merge branch '4.2' of github.com:rizarsyi/cloud-native-edition into 4.2
rizarsyi Aug 28, 2020
bc220c8
Fix custom validator params
rizarsyi Aug 29, 2020
63834c3
use DataRequired instead of Required. due to wtforms deprecation
rizarsyi Aug 29, 2020
45dcca7
add docstring
rizarsyi Aug 29, 2020
6fe8be9
update validators
rizarsyi Aug 29, 2020
9b929c7
fix custom validator params name
rizarsyi Aug 29, 2020
a8d50c0
make secret key auto generated
rizarsyi Aug 29, 2020
9de5476
rename and move wizard and install views
rizarsyi Aug 29, 2020
341137e
add docstring
rizarsyi Aug 29, 2020
2bbe54d
add parser argument to define host
rizarsyi Aug 29, 2020
b26fe42
make static assets accessible for all templates
rizarsyi Aug 29, 2020
1aa7028
add new homepage
rizarsyi Aug 29, 2020
3f18090
add docstring
rizarsyi Aug 29, 2020
1722e80
fix conflict merge
rizarsyi Aug 29, 2020
36e99a9
fix missing value for jackrabbit password confirmation
rizarsyi Aug 29, 2020
eb8f930
add istio form settings
rizarsyi Aug 29, 2020
df907d9
update base html structure
rizarsyi Aug 29, 2020
89a76bc
fix typo
rizarsyi Aug 29, 2020
a734c02
add docstring
rizarsyi Aug 29, 2020
abfd38e
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Aug 31, 2020
c3a0676
include postgres settings on jackrabbit setting form
rizarsyi Aug 31, 2020
ce1bb92
update gluu-gateway form settings, set enable_services
rizarsyi Aug 31, 2020
6ce78b9
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Sep 1, 2020
9c25ea2
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Sep 2, 2020
62e286a
Tidy up forms modules
rizarsyi Sep 8, 2020
ebc4bbe
rename agreement view endpoint
rizarsyi Sep 8, 2020
70dab1f
adjust wizard steps
rizarsyi Sep 8, 2020
9ad0bf3
update ENABLE_SERVICES_LIST setting
rizarsyi Sep 8, 2020
40dd026
adjust wizard prev next steps
rizarsyi Sep 8, 2020
2f60b06
fix environment form dynamic validators
rizarsyi Sep 8, 2020
5e7ffdc
add ldap_storage_size to volumes form
rizarsyi Sep 8, 2020
8dbd44e
remove ldap storage form
rizarsyi Sep 8, 2020
9592bb4
hide jackrabbit_admin_password in summary view
rizarsyi Sep 8, 2020
f6df715
set default form to couchbase backup form
rizarsyi Sep 8, 2020
e9ff248
clean up
rizarsyi Sep 8, 2020
2021580
Change style from radio to switch toggle
rizarsyi Sep 8, 2020
5a9c856
split settings form
rizarsyi Sep 8, 2020
dfb73d8
fix html template
rizarsyi Sep 8, 2020
8e1f174
reformat enable_services_list value
rizarsyi Sep 8, 2020
13b2298
fix show hide arn field
rizarsyi Sep 8, 2020
f0e0589
rename script by template
rizarsyi Sep 8, 2020
3683948
clean up
rizarsyi Sep 8, 2020
9ad328d
update log box style
rizarsyi Sep 8, 2020
899e961
add ldap_storage_size field
rizarsyi Sep 8, 2020
a98ffb4
Merge branch '4.2' of github.com:GluuFederation/cloud-native-edition …
rizarsyi Sep 8, 2020
be398c2
remove double rendered field
rizarsyi Sep 8, 2020
72ca429
fix overriding dynamic choices
rizarsyi Sep 8, 2020
768d2b0
hide jackrabbit_pg_password on summary page
rizarsyi Sep 8, 2020
8e246df
fix overriding form with dynamic fields
rizarsyi Sep 8, 2020
5809f01
include gui static files
rizarsyi Sep 9, 2020
3c8fbca
fix conflict merge
rizarsyi Sep 10, 2020
0bc1f90
rename common module
rizarsyi Sep 11, 2020
c8b4b49
reorder wizard steps
rizarsyi Sep 11, 2020
22cafaa
Add installer features
rizarsyi Sep 11, 2020
1cad9f8
clean up
rizarsyi Sep 11, 2020
3b6477c
add alpha message on couchbase calculator option
rizarsyi Sep 11, 2020
9d457d3
skip volumes form if it's test architecture and couchbase backend
rizarsyi Sep 11, 2020
97cb20f
remove log offset file before process install
rizarsyi Sep 11, 2020
3bff3ee
add link into passed respective wizard steps
rizarsyi Sep 11, 2020
1b9a1b9
add quit wizard
rizarsyi Sep 11, 2020
b8f18db
Final additions
moabu Sep 14, 2020
fe44a89
Fix gluu version selection
rizarsyi Sep 14, 2020
56334f8
Update Makefile
moabu Sep 14, 2020
99bba4d
FIx password validator factory
rizarsyi Sep 14, 2020
b2edf7f
Fix conflict merge
rizarsyi Sep 14, 2020
8f767dd
activate all install and utility features
rizarsyi Sep 21, 2020
29051c0
Fix wrong field description
rizarsyi Sep 21, 2020
59e0ce7
enhance styles
rizarsyi Sep 21, 2020
ccce0a2
fix conflict merge
rizarsyi Sep 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pygluu/kubernetes/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ def main():
web logs and socketio is disabled to avoid mixing with system logs
this make easier to read system logs.
"""
parser = argparse.ArgumentParser()
parser.add_argument("-H", "--host", action="store", default="0.0.0.0")
parser.add_argument("-p", "--port", action="store", default="5000")
parser.add_argument("-d", "--debug", type=bool, action="store",
default=False,
help="Enable/Disable debug (default: false)")

args = parse_args()
host = args.host
port = args.port
Expand Down
4 changes: 2 additions & 2 deletions pygluu/kubernetes/gui/forms/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ConfigurationForm(FlaskForm):
"oxTrust Password",
widget=PasswordInput(hide_value=False),
validators=[InputRequired(),
password_requirement_check],
password_requirement_check()],
description="Password is randomly generated with 6 characters contain "
"number, uppercase letter, lower case letter and symbol")
admin_pw_confirm = StringField(
Expand All @@ -86,7 +86,7 @@ class ConfigurationForm(FlaskForm):

# override ldap_pw validators
if settings.get("PERSISTENCE_BACKEND") in ("hybrid", "ldap"):
ldap_pw.validators = [InputRequired(), password_requirement_check]
ldap_pw.validators = [InputRequired(), password_requirement_check()]
else:
ldap_pw.validators = [Optional()]
ldap_pw.render_kw = {"disabled": "disabled"}
Expand Down
2 changes: 1 addition & 1 deletion pygluu/kubernetes/gui/forms/couchbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class CouchbaseForm(FlaskForm):
couchbase_password = StringField(
"Couchbase password",
widget=PasswordInput(hide_value=False),
validators=[InputRequired(), password_requirement_check],
validators=[InputRequired(), password_requirement_check()],
description="Password is randomly generated with 6 characters contain "
"number, uppercase letter, lower case letter and symbol")
couchbase_password_confirmation = StringField(
Expand Down
4 changes: 2 additions & 2 deletions pygluu/kubernetes/gui/forms/gluugateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class GluuGatewayForm(FlaskForm):
"Kong Postgress Password",
widget=PasswordInput(hide_value=False),
validators=[RequiredIfFieldEqualTo("install_gluu_gateway", "Y"),
password_requirement_check],
password_requirement_check()],
description="Password is randomly generated with 6 characters contain "
"number, uppercase letter, lower case letter and symbol")
kong_pg_password_confirm = StringField(
Expand All @@ -79,7 +79,7 @@ class GluuGatewayForm(FlaskForm):
"Gluu Gateway UI postgres password",
widget=PasswordInput(hide_value=False),
validators=[RequiredIfFieldEqualTo("install_gluu_gateway", "Y"),
password_requirement_check],
password_requirement_check()],
description="Password is randomly generated with 6 characters contain "
"number, uppercase letter, lower case letter and symbol")
gluu_gateway_ui_pg_password_confirm = StringField(
Expand Down
30 changes: 30 additions & 0 deletions pygluu/kubernetes/gui/forms/helm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
pygluu.kubernetes.gui.forms.helm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module contains helpers to interact with user's inputs for helm gui form.

License terms and conditions for Gluu Cloud Native Edition:
https://www.apache.org/licenses/LICENSE-2.0
"""
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import InputRequired, Optional


class HelmForm(FlaskForm):
gluu_helm_release_name = StringField("Please enter Gluu helm name",
default="gluu",
validators=[InputRequired()])
nginx_ingress_release_name = StringField("Please enter nginx-ingress helm name",
default="ningress",
validators=[InputRequired()])
nginx_ingress_namespace = StringField("Please enter nginx-ingress helm namespace",
default="ingress-nginx",
validators=[InputRequired()])
kong_helm_release_name = StringField("Please enter Gluu Gateway helm name",
default="gluu-gateway",
validators=[Optional()])
gluu_gateway_ui_helm_release_name = StringField("Please enter Gluu Gateway UI helm name",
default="gluu-gateway-ui",
validators=[Optional()])
22 changes: 13 additions & 9 deletions pygluu/kubernetes/gui/forms/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,24 @@
}


def password_requirement_check(form, field):
def password_requirement_check():
"""
Password Requirement validation,
password required contain at least one digit,
uppercase letter, lower case and symbol
"""
regex_bool = re.match(
'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W)[a-zA-Z0-9\S]{6,}$',
field.data)
if not regex_bool:
raise ValidationError(
"Password does not meet requirements. "
"The password must contain one digit, one uppercase "
"letter, one lower case letter and one symbol")
message = "Password does not meet requirements. "\
"The password must contain one digit, one uppercase "\
"letter, one lower case letter and one symbol"

def _password_requirement_check(form, field):
regex_bool = re.match(
'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*\W)[a-zA-Z0-9\S]{6,}$',
field.data)
if not regex_bool:
raise ValidationError(message)

return _password_requirement_check


class RequiredIfFieldEqualTo(DataRequired):
Expand Down
4 changes: 2 additions & 2 deletions pygluu/kubernetes/gui/forms/jackrabbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class JackrabbitForm(FlaskForm):
"Jackrabbit Admin Password",
widget=PasswordInput(hide_value=False),
validators=[InputRequired(),
password_requirement_check])
password_requirement_check()])
jackrabbit_admin_password_confirmation = StringField(
"Jackrabbit Admin Password Confirmation",
widget=PasswordInput(hide_value=False),
Expand All @@ -71,7 +71,7 @@ class JackrabbitForm(FlaskForm):
jackrabbit_pg_password = StringField("Jackrabbit PG Password",
widget=PasswordInput(hide_value=False),
validators=[RequiredIfFieldEqualTo("jackrabbit_cluster", "Y"),
password_requirement_check])
password_requirement_check()])
jackrabbit_pg_password_confirmation = StringField(
"Jackrabbit PG Password Confirmation",
widget=PasswordInput(hide_value=False),
Expand Down
4 changes: 2 additions & 2 deletions pygluu/kubernetes/gui/forms/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class PostgresForm(FlaskForm):
postgres_url (string|required|default: postgres.postgres.svc.cluster.local )
"""
postgres_namespace = StringField(
"Please enter number of replicas for postgres",
"Please enter a namespace for postgres",
default="postgres",
validators=[InputRequired()])
postgres_replicas = IntegerField(
"Please enter a namespace for postgres",
"Please enter number of replicas for postgres",
default=3,
validators=[InputRequired()])
postgres_url = StringField(
Expand Down
34 changes: 34 additions & 0 deletions pygluu/kubernetes/gui/forms/upgrade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
pygluu.kubernetes.gui.forms.upgrade
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This module contains helpers to interact with user's input for gui gluu upgrade form

License terms and conditions for Gluu Cloud Native Edition:
https://www.apache.org/licenses/LICENSE-2.0
"""
from flask_wtf import FlaskForm
from wtforms import RadioField
from wtforms.validators import DataRequired

from pygluu.kubernetes.helpers import get_supported_versions


class UpgradeForm(FlaskForm):
"""
Gluu upgrade form

Fields :
gluu_version (string|required)
"""
versions, version_number = get_supported_versions()
supported_versions = []

for k, v in versions.items():
supported_versions.append((k, k))

upgrade_target_version = RadioField(
"Please enter the version to upgrade Gluu to",
choices=supported_versions,
default=version_number,
validators=[DataRequired(message="Please select version")])
Loading