I'm using something like role/profile pattern to describe my infrastructure with Puppet 3.x and Hiera.
Now stumbled on a problem, how should I configure something like the IP address that something will listen given that I have multiple IPs and each application(nginx hosts) should be segregated by IP.
I have some ideas on how to do that by don't know if there is a de facto solution or if I should just pick one and live my life:
Use Hiera to configure it, using variable interpolation($::ipaddress_eth0, $ipaddress_eth1)
Hardcode which network interface each application uses direct in the manifest
Configure it on the profile
... ??
I would suggest using the first method since you are able to easily override the IP configuration everywhere and everytime on host / application / environment basis. That means you are extremely flexible when it comes to detailed host specific changes.
Keep in mind that variable interpolation in hiera is done by %{::foobar} instead of ${::foobar} like it's done in the manifests.
Related
I want to run several docker containers in different regions (asia, eu, us) which host a nginx server.
However, they should all have the same configuration because I need to updated hostnames at runtime dynamically (one domain for every new tenant).
So I guess it would be the easiest way to just share one config file among all containers and reload them...
So how can I share data/files among n containers on azure?
In general, unless you want to use proprietary solutions specific to the platform at hand, the best way to synchronise files between multiple systems is with the help of rsync.
For example, in DNS, there exists a specialised protocol for transferring domain zones directly within the DNS software, called AXFR; one of the authors of a newer DNS implementation suggests that this AXFR protocol is crap, and rsync over ssh works much better — http://cr.yp.to/djbdns/tcp.html — and the ssh part is a nice thing about rsync, in that it can work over plain old ssh protocol as far as interconnection between the hosts goes, not requiring any special firewall considerations.
Have you considered using the Azure file share.
I am developing an embedded system accessed through a node server running express.js. One of the functions that I'm trying to provide our users is the ability to configure the network interfaces via a web UI/REST call, without the need to drop down to a SSH session.
Here's my question: Is there a programmatic way of setting an interface as DHCP or static? Short of editing /etc/network/interfaces, I haven't been able to google or stackoverflow search a programmatic method. Can anyone recommend a direction and/or best practices for doing this?
p.s., I should mention that as part of my change, I would have the necessary configuration parameters (e.g., address, netmask, gateway) and, of course, I would preface any changes with ifconfig down.
Not really. If you want to modify network configuration, you'll need to edit the config file and invoke /etc/init.d/networking script to apply the changes.
If you want to change active network configuration, you need to exec() appropriate tools, e.g. ifconfig of dhcpcd.
I've installed Alfresco CE in a Windows 7 machine (which is not ideal, but I have to deal with it). I can access my Alfresco share from inside the network:
192.168.2.252:8080/share
As far as I know, I can access it from outside the network using a dns service like no-ip.org, which gives me something like:
example.no-ip.org:8080/share
What I'm trying to do is to get something like:
mycustomdomain.com/share/ (removing the /share/ would be great too)
I've been reading a lot, but I'm not sure what to do. I read something about setting up DNS on my machine, but I don't know how to point the domain to the Alfresco share. Any suggestions?
Ip which you have shared is internal IP.You need to have one external IP.Which can be accessed outside network.
Below file will help you in URL redirection.If you want to remove share , you may also do that by configuration in below file.
tomcat\webapps\share\WEB-INF\urlrewrite.xml
I'm configuring a new Apache 2.4 webserver. I've installed and run Apache many times in the past but always tended to stick to what I learned in the early days when it came to configuration files, in particular I'd usually just have one virtualhosts.conf file somewhere and add all virtual hosts to it, with the first one in the file automatically becoming the default host that was served if someone visited the server just by IP address. Where a server had multiple IPs, then the default host would be the first one in the file configured to answer on that IP.
However with the new box I'm trying to do things "properly", which I gather means that in /etc/apache2/vhosts.d I should create a separate config file for each virtualhosted website. Which works, and is fine so far - but there doesn't seem to be any specific mechanism to specify which one should be the default for each IP on the server, other than them being arranged alphabetically. Ok, I can work round this by naming the one I want to be first 00-name.conf, so it automatically comes first in ASCII, but that seems a bit clunky - is there a formal method for instructing Apache that a specific virtualhost out of the many that may exist for a given IP is to be the default one?
I've tried Googling, and reading the Apache documentation, but not found anything that answers this specific question.
There's nothing in the Apache documentation because that default configuration is a debian/ubuntu invention. In that environment, using numbered config files to determine the default VH for a set of name-based virtual hosts is absolutely a standard thing to do.
I whant to make a web interface on a server that will manage a few dns servers on another servers.
How can i remotely manage a bind dns server programmaticly ?
I would like to add/edit/delete zones.
I see that there is rndc but that only allows reloading of zones and not adding/deleting.
I could NFS mount zones from dns servers and edit them but is there a better way?
If there isn't a hard requirement on writing something like this from scratch, why not simply use an already existing interface without having to reinvent the wheel? A simple Google search for the keywords bind dns web interface yields an entire list of good open source projects in the very first result link.
There is work at the IETF to define a standard for remote control of name servers based on the Netconf framework. See:
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-name-server-management-reqs
https://datatracker.ietf.org/doc/html/draft-dickinson-dnsop-nameserver-control-00.txt
The requirements include the ability to add/remove zones, etc.
You could set up something that does remote SSH commands? That may be a bit insecure, though, unless the server running the commands themselves is pre-authenticated with an SSH key, and that's the only way you can access the server.