Skip to content

Commit

Permalink
Fix docker image using a .NET 9 preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Dec 6, 2024
1 parent 15d94d6 commit 08349ef
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 9.0 --quality preview --runtime aspnetcore && \
./dotnet-install.sh --channel 9.0 --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down Expand Up @@ -206,7 +206,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 9.0 --quality preview --runtime aspnetcore && \
./dotnet-install.sh --channel 9.0 --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down
9 changes: 2 additions & 7 deletions k8s/elastic-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ metadata:
namespace: elastic-system
spec:
version: 8.16.1
podDisruptionBudget:
spec:
minAvailable: 2
selector:
matchLabels:
elasticsearch.k8s.elastic.co/cluster-name: elastic-monitor
podDisruptionBudget: {}
nodeSets:
- name: main
count: 3
count: 1
config:
# if not setting max_map_count in an init container, then use this setting
#node.store.allow_mmap: false
Expand Down
18 changes: 9 additions & 9 deletions k8s/ex-prod-elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ metadata:
spec:
version: 8.16.1
image: exceptionless/elasticsearch:8.16.1 # https://github.com/exceptionless/Exceptionless/tree/main/build/docker/elasticsearch
# monitoring:
# metrics:
# elasticsearchRefs:
# - name: elastic-monitor
# namespace: elastic-system
# logs:
# elasticsearchRefs:
# - name: elastic-monitor
# namespace: elastic-system
monitoring:
metrics:
elasticsearchRefs:
- name: elastic-monitor
namespace: elastic-system
logs:
elasticsearchRefs:
- name: elastic-monitor
namespace: elastic-system
secureSettings:
- secretName: ex-prod-snapshots
http:
Expand Down
8 changes: 6 additions & 2 deletions k8s/ex-prod-tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
$ELASTIC_PASSWORD=$(kubectl get secret --namespace ex-prod "ex-prod-es-elastic-user" -o go-template='{{.data.elastic | base64decode }}')

# connect to kibana
open "http://kibana-ex-prod.localtest.me:5660" && kubectl port-forward --namespace ex-prod service/ex-prod-kb-http 5660:5601
$ELASTIC_JOB = kubectl port-forward --namespace ex-prod service/ex-prod-kb-http 5660:5601 &
Remove-Job $ELASTIC_JOB
Start-Process "http://elastic:$ELASTIC_PASSWORD@kibana-ex-prod.localtest.me:5660"

# port forward elasticsearch
$ELASTIC_JOB = kubectl port-forward --namespace ex-prod service/ex-prod-es-http 9260:9200 &
Expand All @@ -14,6 +16,8 @@ $ELASTIC_MONITOR_PASSWORD=$(kubectl get secret --namespace elastic-system "elast
$ELASTIC_JOB = kubectl port-forward --namespace elastic-system service/elastic-monitor-es-http 9280:9200 &
Remove-Job $ELASTIC_JOB

Start-Process "https://elastic:$ELASTIC_MONITOR_PASSWORD@localhost:9280"

curl -k https://elastic:$ELASTIC_MONITOR_PASSWORD@localhost:9280/_cluster/health?pretty
curl -k https://elastic:$ELASTIC_MONITOR_PASSWORD@localhost:9280/_cat/allocation?v
curl -k https://elastic:$ELASTIC_MONITOR_PASSWORD@localhost:9280/_cluster/allocation/explain?pretty
Expand All @@ -28,7 +32,7 @@ kubectl exec --stdin --tty ex-prod-redis-node-0 -- /bin/bash -c "redis-cli -a $R
# open kubernetes dashboard
$DASHBOARD_PASSWORD=$(kubectl get secret --namespace kubernetes-dashboard admin-user-token-w8jg7 -o go-template='{{.data.token | base64decode }}')
kubectl proxy
open "http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"
Start-Process "http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/"

# open kubecost
kubectl port-forward --namespace kubecost deployment/kubecost-cost-analyzer 9090
Expand Down

0 comments on commit 08349ef

Please sign in to comment.