Difference between revisions of "CoGe VM"

From CoGepedia
Jump to: navigation, search
m (moved Coge VM to CoGe VM)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
Since the Atmosphere Virtual Machines change IP Address every time they are suspended and resumed, a script is required to automatically update the IP Address in the coge.conf file.  
 
Since the Atmosphere Virtual Machines change IP Address every time they are suspended and resumed, a script is required to automatically update the IP Address in the coge.conf file.  
  
First, create the directory in which this script will reside
+
First, create the directory in which this script will reside  
 
<pre>sudo mkdir /etc/atmo
 
<pre>sudo mkdir /etc/atmo
 
sudo mkdir /etc/atmo/post-scripts.d
 
sudo mkdir /etc/atmo/post-scripts.d
 
cd /etc/atmo/post-scripts.d
 
cd /etc/atmo/post-scripts.d
</pre>
+
</pre>  
Then create a file
+
Then create a file  
 
<pre>sudo nano IPsetup
 
<pre>sudo nano IPsetup
</pre>
+
</pre>  
Paste the following into the contents of IPsetup
+
Paste the following into the contents of IPsetup  
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
 
HNAME=$(hostname -i)
 
HNAME=$(hostname -i)
 
sed -i "s/^SERVER.*/SERVER    http:\/\/$HNAME\//g" /opt/coge/web/coge.conf
 
sed -i "s/^SERVER.*/SERVER    http:\/\/$HNAME\//g" /opt/coge/web/coge.conf
 +
</pre>
 +
Make sure to edit /opt/coge/web/coge.conf to point to the correct path for coge.conf
 +
 +
 +
 +
If for some reason the script does not function correctly, the SERVER line of coge.conf will need to be edited to read
 +
<pre>SERVER    http://{your IP address}/
 
</pre>
 
</pre>
Make sure to edit /opt/coge/web/coge.conf to point to the correct path for coge.conf
+
where {your IP address} is the IP Address listed under the instance on the Atmosphere instance page.

Latest revision as of 10:50, 11 July 2014

Auto-updating IP Address

Since the Atmosphere Virtual Machines change IP Address every time they are suspended and resumed, a script is required to automatically update the IP Address in the coge.conf file.

First, create the directory in which this script will reside

sudo mkdir /etc/atmo
sudo mkdir /etc/atmo/post-scripts.d
cd /etc/atmo/post-scripts.d

Then create a file

sudo nano IPsetup

Paste the following into the contents of IPsetup

#!/bin/sh
HNAME=$(hostname -i)
sed -i "s/^SERVER.*/SERVER     http:\/\/$HNAME\//g" /opt/coge/web/coge.conf

Make sure to edit /opt/coge/web/coge.conf to point to the correct path for coge.conf


If for some reason the script does not function correctly, the SERVER line of coge.conf will need to be edited to read

SERVER     http://{your IP address}/

where {your IP address} is the IP Address listed under the instance on the Atmosphere instance page.