Solar pool heating is often bonded in place using a silicone sealant.
We suggest our Roof and Gutter Silicone for this application. It is a good idea to do it in vertical beads spaced evenly apart. A continuous bead will seal it to the roof and prevent any buildup of water when flowing down the roof.