Posted on 04-30-2019 03:06 PM
Hey everyone,
Since I've switched roles at my company, I have been giving the task of moving JAMF up to AWS. We are using a Terraform infrastructure, deploying with Jenkins and I have the following all set up:
ECS Service for Agent nodes and Master nodes
RDS for DB
Elasticache using memcached
The one thing that I can't seem to figure out or wrap my head around is migrating the master node. Currently, our on DB is pointing to our on-prem server as the Master. Whenever I join one of my ECS containers to the cluster, it specifies an IP. Since this is going to change any time the container is redeployed, I'd much prefer to set the Master node by host name. Could anybody please give me some guidance or something to look into? I can't see anywhere that this can be set.
Thank you!
Posted on 05-03-2019 10:18 AM
Check out this configuration.sh script: https://github.com/jamf/jamfpro/blob/master/configuration.sh#L118. You can set the master IP/DNS before spinning up the tomcat webapp.
Posted on 05-06-2019 02:20 PM
Thank you for the clarification. I have been setting that variable to be a hostname; but the database doesn't see that hostname connected (it merely sees the IP). Curious if this is why it's not taking.
In any case, if i were to start a container up; and sets the master to 172.16.8.100-- then the container dies, spawns a new one, and sets the master to 172.16.8.108; do you think the change would take effect? I know you didn't write the linked code; but it seems like you may have a better understanding than I.
Any information would be great. We are trying to get a master node and agent node in ECS; but the IP changing when the task restarts is giving us some problems.
Thanks for the advice!
Posted on 05-06-2019 03:04 PM
I don't use ECS, I run Jamf Pro in Kubernetes. Basically the MySQL server defines the IP/DNS which has to be set in the clustering.properties
file. So, connect to your MySQL server and run SHOW PROCESSLIST;
. Whatever MySQL shows needs to be set, then you can destroy your webapp and spin up a new one with a new IP address as much you want and the cluster is configured correctly.
Posted on 05-06-2019 05:39 PM
You rock. Thank you so much for the clarification! We ended up getting the Master Node setting itself to be the head of the cluster. The newest problem we are hitting is that as soon as the agent node comes online, it disables clustering entirely. Quite curious on that one, but I'll take a look and see what may be causing this or overwriting the data. I suspect it may have to do with our memcached servers.
Posted on 05-02-2022 03:32 PM
HI @mm13
I am also trying to use JAMF PRO on ECS fargate cluster, Could you please let me know how did you overcome this issue?
Posted on 05-02-2022 05:37 PM
Hey @manojkalakoti
Unfortunately it's been so long that I don't quite remember what the solution was here; as we moved it over to Kubernetes pretty soon (which is a little easier to reference in-cluster IPs as vars and so on).
I do remember some of the janky things we did though; we had two separate tasks, one running as the Master node and one set running as the followers. We must have associated a static IP with the ECS container running; but I don't fully recall logistics.
The official Github is a good resource (might have luck on the 'Issues' tab), but unfortunately I can't be much help in your current case.
Good luck!