eindelijk weer eens een push

This commit is contained in:
allard
2026-05-31 16:07:30 +02:00
parent 01cff8e165
commit ff21c258e0
2747 changed files with 302316 additions and 131101 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ func failOnError(err error, msg string) {
}
func main() {
conn, err := amqp.Dial("amqp://guest:guest@localhost:5672/")
conn, err := amqp.Dial("amqp://guest:guest@localhost:31210/")
failOnError(err, "Failed to connect to RabbitMQ")
defer conn.Close()
@@ -22,7 +22,7 @@ func main() {
defer ch.Close()
q, err := ch.QueueDeclare(
"Dial-DCS-queue", // name
"ALL-DCS-queue", // name
true, // durable
false, // delete when unused
false, // exclusive
+7 -16
View File
@@ -21,10 +21,10 @@ spec:
volumeMounts:
- mountPath: /var/lib/rabbitmq
name: rabbitmq
subPath: rabbitmq/data
subPath: data
- mountPath: /var/log/rabbitmq
name: rabbitmq
subPath: rabbitmq/log
subPath: log
volumes:
- name: rabbitmq
persistentVolumeClaim:
@@ -68,8 +68,8 @@ spec:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/rabbitmq
server: 192.168.2.111
path: /mnt/nfs_share/dev/rabbitmq
readOnly: false
---
apiVersion: v1
@@ -96,7 +96,7 @@ spec:
entryPoints:
- web
routes:
- match: Host(`rabbitmq-prod.allarddcs.nl`)
- match: Host(`rabbitmq-dev.allarddcs.nl`)
kind: Rule
services:
- name: rabbitmq
@@ -111,25 +111,16 @@ spec:
entryPoints:
- websecure
routes:
- match: Host(`rabbitmq-prod.allarddcs.nl`)
- match: Host(`rabbitmq-dev.allarddcs.nl`)
kind: Rule
services:
- name: rabbitmq
port: 15672
- match: Host(`rabbitmqa-prod.allarddcs.nl`)
- match: Host(`rabbitmqa-dev.allarddcs.nl`)
kind: Rule
services:
- name: rabbitmq
port: 5672
tls:
certResolver: letsencrypt
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: redirect-to-https
spec:
redirectScheme:
scheme: https
permanent: true
+3 -3
View File
@@ -2,16 +2,16 @@
import pika, os, time
def alldcs_process_function(msg):
# print(" ALLDCS processing")
# print(" AllardDCS processing")
# print(" [x] Received " + str(msg))
print(str(msg))
time.sleep(1) # delays for 5 seconds
# print(" ALLDCS processing finished");
# print(" AllardDCS processing finished");
return;
# Access the CLODUAMQP_URL environment variable and parse it (fallback to localhost)
url = os.environ.get('CLOUDAMQP_URL', 'amqp://guest:guest@localhost:32189/%2f')
url = os.environ.get('CLOUDAMQP_URL', 'amqp://guest:guest@localhost:31210/%2f')
params = pika.URLParameters(url)
connection = pika.BlockingConnection(params)
channel = connection.channel() # start a channel
-6
View File
@@ -1,6 +0,0 @@
./rabbitmqadmin --host=rabbitmq-riscv.allarddcs.nl \
--port=443 \
--ssl \
--username=guest \
--password=guest \
declare queue name=testqueue durable=true
-150
View File
@@ -1,150 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: rabbitmq
namespace: rabbitmq
labels:
app: rabbitmq
spec:
replicas: 1
selector:
matchLabels:
app: rabbitmq
template:
metadata:
labels:
app: rabbitmq
spec:
containers:
- name: rabbitmq
image: docker.io/riscv64/rabbitmq:3-management
volumeMounts:
- mountPath: /var/lib/rabbitmq
name: rabbitmq
subPath: rabbitmq/data
- mountPath: /var/log/rabbitmq
name: rabbitmq
subPath: rabbitmq/log
volumes:
- name: rabbitmq
persistentVolumeClaim:
claimName: rabbitmq-pvc
---
apiVersion: v1
kind: Service
metadata:
name: rabbitmq
namespace: rabbitmq
spec:
ports:
- name: port1
targetPort: 5672
port: 5672
- name: port2
targetPort: 15672
port: 15672
- name: port3
targetPort: 55670
port: 55670
- name: port4
targetPort: 55674
port: 55674
selector:
app: rabbitmq
type: NodePort
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: rabbitmq-pv
spec:
storageClassName: ""
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
mountOptions:
- hard
- nfsvers=4.1
nfs:
server: 192.168.2.110
path: /mnt/nfs_share/rabbitmq/riscv
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rabbitmq-pvc
namespace: rabbitmq
spec:
storageClassName: ""
volumeName: rabbitmq-pv
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: rabbitmq-http
namespace: rabbitmq
spec:
entryPoints:
- web
routes:
- match: Host(`rabbitmq-riscv.allarddcs.nl`)
kind: Rule
middlewares:
- name: redirect-to-https
namespace: rabbitmq
services:
- name: rabbitmq
port: 15672
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: rabbitmq-tls
namespace: rabbitmq
spec:
entryPoints:
- websecure
routes:
- match: Host(`rabbitmq-riscv.allarddcs.nl`)
kind: Rule
services:
- name: rabbitmq
port: 15672
tls:
certResolver: letsencrypt
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: redirect-to-https
namespace: rabbitmq
spec:
redirectScheme:
scheme: https
permanent: true
---
apiVersion: v1
kind: Service
metadata:
name: rabbitmq-amqp
namespace: rabbitmq
spec:
type: NodePort
ports:
- port: 5672
targetPort: 5672
protocol: TCP
nodePort: 31541 # You can specify or let k8s pick one in 30000-32767 range
name: amqp
selector:
app.kubernetes.io/name: rabbitmq
File diff suppressed because it is too large Load Diff
-8
View File
@@ -1,8 +0,0 @@
./rabbitmqadmin \
--host=rabbitmq-riscv.allarddcs.nl \
--port=443 \
--ssl \
--username=guest \
--password=guest \
get queue=testqueue count=1 \
--arguments='{"requeue":false}'
-6
View File
@@ -1,6 +0,0 @@
./rabbitmqadmin --host=rabbitmq-riscv.allarddcs.nl \
--port=443 \
--ssl \
--username=guest \
--password=guest \
publish routing_key=testqueue payload="Hello from CLI"
+1 -1
View File
@@ -16,7 +16,7 @@ func failOnError(err error, msg string) {
func main() {
// Here we connect to RabbitMQ or send a message if there are any errors connecting.
conn, err := amqp091.Dial("amqp://guest:guest@localhost:32189/")
conn, err := amqp091.Dial("amqp://guest:guest@localhost:31210/")
failOnError(err, "Failed to connect to RabbitMQ")
defer conn.Close()