mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Trying out some stuff
This commit is contained in:
parent
d7cf373450
commit
3ed16d78b7
2 changed files with 10 additions and 7 deletions
|
@ -80,7 +80,16 @@ start
|
|||
build_container
|
||||
description
|
||||
|
||||
msg_info "Configuring User"
|
||||
ELASTIC_USER=elastic
|
||||
KIBANA_USER=kibana
|
||||
ELASTIC_PASSWORD=$(lxc-attach -n "$CTID" -- bash -c "/usr/share/elasticsearch/bin/elasticsearch-reset-password -sbf -u $ELASTIC_USER" || exit)
|
||||
KIBANA_TOKEN=$(lxc-attach -n "$CTID" -- bash -c "/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s $KIBANA_USER" || exit)
|
||||
ENROLLMENT_TOKEN=$(lxc-attach -n "$CTID" -- bash -c "/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node" || exit)
|
||||
msg_ok "Configured User"
|
||||
|
||||
msg_info "Checking Health"
|
||||
ELASTIC_PORT=9200
|
||||
echo "User: $ELASTIC_USER"
|
||||
echo "Password: $ELASTIC_PASSWORD"
|
||||
$STD curl -XGET --insecure --fail --user $ELASTIC_USER:$ELASTIC_PASSWORD https://${IP}:$ELASTIC_PORT/_cluster/health?pretty
|
||||
|
|
|
@ -45,13 +45,6 @@ $STD /bin/systemctl enable elasticsearch.service
|
|||
$STD /bin/systemctl start elasticsearch.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Configuring User"
|
||||
ELASTIC_USER=elastic
|
||||
ELASTIC_PASSWORD=$($STD /usr/share/elasticsearch/bin/elasticsearch-reset-password -sbf -u $ELASTIC_USER)
|
||||
KIBANA_TOKEN=$($STD /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana)
|
||||
ENROLLMENT_TOKEN=$($STD /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node)
|
||||
msg_ok "Configured User"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
@ -60,4 +53,5 @@ $STD apt-get -y autoremove
|
|||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
|
||||
export ELASTIC_USER ELASTIC_PASSWORD KIBANA_TOKEN ENROLLMENT_TOKEN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue