Terraform - self.default_ip_address / ipv4_address missmatch - jenkins

I have some annoying problem here.
I am trying to use file and remote-exec provisioners when creating (Windows) VM-s with Terraform.
Please see my template (this is only for a VM, I separated it from the variables and the core infrastructure for now) here: https://code.prkr.li/60463d5e2b38ad032b4b6678
The only thing that does not work presently is using the self.default_ip_address as a host for the provisioner's connection. The task (as seen in the Terraform logs in Jenkins) tries to connect to the IP address that the VM got from DHCP...
...instead of what is defined in the (customization) config...
So I suppose viable solutions would be:
refreshing the default IP
using hostname (not sure if that is possible, did not manage to find the right syntax)
???
Any ideas / suggestion please?

Not that there were a lot of answers, but I found my solution apparently.
Anyone having similar issue, suggested to use
host = self.clone.0.customize.0.network_interface.0.ipv4_address
Workes for me anyway.

Related

How to fix Jenkins agent connections error?

Could you help me with my studies? I created two linux ec2 instances using terraform. Jenkins is running on the first, and the agent is on the second. In userdata I modifyed the PS1 code, and I think the error is related to this. I was able to solve this problem once by deleting the content .bushrc but it didn't help me now.
Maybe I didn't ask clearly but I'm just learning and ask the question for the first time)
Thanks for the answers!
I tried to find a solution to modify .bashrc

Traefik/Docker/Wildfly - Cannot access Wildfly management console

I'm running Traefik in a Docker container, with Wildfly in other container.
I have the following labels in Wildfly's docker-compose.yml:
- "traefik.web.port=8080"
- "traefik.web.frontend.rule=Host:temporary_wildfly_hostname"
- "traefik.admin.port=9990"
- "traefik.admin.frontend.rule=Host:temporary_wildfly_hostname;PathStrip:/console/"
I can access the main Wildfly, which is in port 8080. I've tried many ways to access the service in port 9990, but the only one which really works is when I use a different Host, which isn't what I want.
I've tried:
Added "traefik.frontend.passHostHeader=true" (even with .admin before .frontend)
Switching PathStrip with PathPrefixStrip, Path PathStripRegex or even PathPrefixStripRegex
Wildfly's management console uses port 9990, redirects from :8080/console and also uses :9990/console/*, so /console by itself is redundant and it shows "too many redirects" errors.
I really think this /console loop error is some kind of an issue. I've been searching online for alternative configurations for other reverse proxies, to see if I'm missing something, but all relate to the headers, which I've already tried.
Any hint on how can I solve this, keeping the same URL, but still redirecting to a different port than the main service?
Thanks a lot for your time and help.
Best regards,
Luis Nabais
You need to add a priority on each segment.
traefik.<segment_name>.frontend.priority=10
Thanks a lot for your answer.
The issue was related to the backend wildfly creates. It uses another URL, which is /management. So I solved it using the following traefik labels:
- "traefik.web.port=8080"
- "traefik.web.frontend.rule=Host:temporary_wildfly_hostname"
- "traefik.admin.port=9990"
- "traefik.admin.frontend.rule=Host:temporary_wildfly_hostname;PathPrefix:/console,/management"

Virtualized Puppet master showing alphanumeric error when trying to load the dashboard

When I try to go to the puppet dashboard it loads up a white page saying
The environment must be purely alphanumeric, not ''
I googled this error a bit but there does not seem to be a finite solution yet. As fast as what I've done I've looked into the conf.d files, but I'm afraid to make the wrong edit. I'm still new to this and was wondering if anyone has ever ran into a similar situation?
This happens if one tries to access puppet console in wrong port (8140) instead of 443, assuming default ports are being used.
This also happens when you install puppet-passenger The opensource.
In this case - everything is OK!
Install Open Source agent and be a Puppet Master :)

JBoss newbie can't load app to custom port

Thanks in advance for your patience. I'm a recent "convert" to JBoss, having the maintenance of an application thrust upon me, and so long as we don't touch it, it works just fine. However, the mandate has come down to port the app from Solaris to Linux Fedora, using version 4.2.3GA.
I am using the jboss-port-bindings.xml to specify the ports I want to use, but when I bring JBoss up it loads to standard port 8080 rather than 40029 like I specify in the file. I have triple-checked the configuration and it's set up on the Linux box exactly the way it's set up on the Solaris box - all the required files are where they are supposed to be, etc.
Anybody have an idea as to why I can't use the specified ports? If you need more information than what I have supplied, please just ask.
We found the problem. The jboss-service.xml file we had in the server/default/conf folder was correct, but we also needed to add the same file to the server/appname/config file, where appname is the name of our application. This told the app where to go looking for the jboss-port-bindings.xml file and now everybody's happy.
Don't know why we didn't have to have that configuration under Solaris, but anyway, this solved the problem. Thanks to those who had a look at the question. Chalk this one up to experience.

How do I access remote machine that runs on Pow (rails web server)

I've recently installed Pow on my Mac. It's great.
It's convenient for my own dev machine. But I wonder if I can set it up to be shared by my colleagues. The problem is DNS resolution part.
For example, if I have a dev site on my machine like "http://myapp.dev". How do I let my colleague access to the site on my machine from his machine?
The hacky way to do this is to make them edit their DNS and insert a record in /etc/hosts that maps to your machine. An easier way to do this is Localghost which doesn't require editing files by hand.
I've been using https://showoff.io and it works a treat. Also allows others not on local network to view it as well (if that's something you need).

Resources