Skip to content

Commit

Permalink
Add changes for c697250
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 19, 2024
1 parent 61bbeae commit be6be8b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
23 changes: 15 additions & 8 deletions _sources/misc/add_new_instance_to_specify_cloud.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
## Example for <dbname>

1. Create Database
1. look through the sql file for issues and do test upload to local database
2. mysql -u<master> -p<master_password> -e "create database <dbname>;"
3. mysql -u<master> -p<master_password> <dbname> < <dbname>.sql
4. may need to run `grant all privileges on eurl.* to <master_password>@'%';` if
master doesn't have access `flush privileges;`
2. DNS Registtration:
1. Review the SQL file before importing to the production server. Test the import locally before uploading to a production instance.
2. Ensure the new database has the same name as the subdomain the user wishes to use, remembering that underscores (`_`) are replaced with dashes (`-`) for the URL.
2. Create the database:
```sql
mariadb -u<master> -p<master_password> -e "CREATE DATABASE <dbname>;"
```
3. Upload and restore the existing database:
```
mariadb -u<master> -p<master_password> <dbname> < <dbname>.sql
```
4. **Note:** You may `GRANT ALL PRIVILEGES ON <dbname>.* TO <master_password>@'%';` if
master doesn't have access `FLUSH PRIVILEGES;`
2. DNS Registration:
1. Login to Dreamhost, select Websites -> Manage Websites
2. For specifycloud.org, select DNS ([Direct link](https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns))
2. For `specifycloud.org`, select DNS ([Direct link](https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns))
3. Add CNAME record that has a name matching the database name and links to the appropraite regional domain value (i.e. `na-specify7-1.specifycloud.org.`, `eu-specify7-1.specifycloud.org.`, etc.). If the database name has underscores (_), replace these with dashes (-).
- `<dbname>` points to `<subdomain>.specifycloud.org.`
For example, database name `herb_rbge` would have the name `herb-rbge.specifycloud.org`.
Expand All @@ -35,7 +42,7 @@
docker exec -it specifycloud-nginx-1 nginx -s reload
```
1. For automatic nginx reloading on certificate renewal create /etc/letsencrypt/renewal-hooks/post/reload-nginx.sh `#!/bin/bash docker exec -it specifycloud_nginx_1 nginx -s reload`
2. `crontab -e;` and then add the line "0 3 * * 0,2,4,6 docker exec specifycloud_nginx_1 nginx -s reload"
2. `crontab -e;` and then add the line `0 3 * * 0,2,4,6 docker exec specifycloud_nginx_1 nginx -s reload`
3. `crontab -l` to list cronjobs
5. Add Specify Admin user credentials to the Bitwarden Vault
7. Asset Server
Expand Down
27 changes: 19 additions & 8 deletions misc/add_new_instance_to_specify_cloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,28 @@ <h2>Example for <dbname><a class="headerlink" href="#example-for" title="Link to
<ol class="arabic">
<li><p>Create Database</p>
<ol class="arabic simple">
<li><p>look through the sql file for issues and do test upload to local database</p></li>
<li><p>mysql -u<master> -p&lt;master_password&gt; -e “create database <dbname>;”</p></li>
<li><p>mysql -u<master> -p&lt;master_password&gt; <dbname> &lt; <dbname>.sql</p></li>
<li><p>may need to run <code class="docutils literal notranslate"><span class="pre">grant</span> <span class="pre">all</span> <span class="pre">privileges</span> <span class="pre">on</span> <span class="pre">eurl.*</span> <span class="pre">to</span> <span class="pre">&lt;master_password&gt;&#64;'%';</span></code> if
master doesn’t have access <code class="docutils literal notranslate"><span class="pre">flush</span> <span class="pre">privileges;</span></code></p></li>
<li><p>Review the SQL file before importing to the production server. Test the import locally before uploading to a production instance.</p></li>
<li><p>Ensure the new database has the same name as the subdomain the user wishes to use, remembering that underscores (<code class="docutils literal notranslate"><span class="pre">_</span></code>) are replaced with dashes (<code class="docutils literal notranslate"><span class="pre">-</span></code>) for the URL.</p></li>
<li><p>Create the database:</p></li>
</ol>
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">mariadb</span><span class="w"> </span><span class="o">-</span><span class="n">u</span><span class="o">&lt;</span><span class="n">master</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">p</span><span class="o">&lt;</span><span class="n">master_password</span><span class="o">&gt;</span><span class="w"> </span><span class="o">-</span><span class="n">e</span><span class="w"> </span><span class="ss">&quot;CREATE DATABASE &lt;dbname&gt;;&quot;</span>
</pre></div>
</div>
<ol class="arabic simple" start="3">
<li><p>Upload and restore the existing database:</p></li>
</ol>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">mariadb</span> <span class="o">-</span><span class="n">u</span><span class="o">&lt;</span><span class="n">master</span><span class="o">&gt;</span> <span class="o">-</span><span class="n">p</span><span class="o">&lt;</span><span class="n">master_password</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">dbname</span><span class="o">&gt;</span> <span class="o">&lt;</span> <span class="o">&lt;</span><span class="n">dbname</span><span class="o">&gt;.</span><span class="n">sql</span>
</pre></div>
</div>
<ol class="arabic simple" start="4">
<li><p><strong>Note:</strong> You may <code class="docutils literal notranslate"><span class="pre">GRANT</span> <span class="pre">ALL</span> <span class="pre">PRIVILEGES</span> <span class="pre">ON</span> <span class="pre">&lt;dbname&gt;.*</span> <span class="pre">TO</span> <span class="pre">&lt;master_password&gt;&#64;'%';</span></code> if
master doesn’t have access <code class="docutils literal notranslate"><span class="pre">FLUSH</span> <span class="pre">PRIVILEGES;</span></code></p></li>
</ol>
</li>
<li><p>DNS Registtration:</p>
<li><p>DNS Registration:</p>
<ol class="arabic simple">
<li><p>Login to Dreamhost, select Websites -&gt; Manage Websites</p></li>
<li><p>For specifycloud.org, select DNS (<a class="reference external" href="https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns">Direct link</a>)</p></li>
<li><p>For <code class="docutils literal notranslate"><span class="pre">specifycloud.org</span></code>, select DNS (<a class="reference external" href="https://panel.dreamhost.com/index.cgi?tree=domain.dashboard#/site/specifycloud.org/dns">Direct link</a>)</p></li>
<li><p>Add CNAME record that has a name matching the database name and links to the appropraite regional domain value (i.e. <code class="docutils literal notranslate"><span class="pre">na-specify7-1.specifycloud.org.</span></code>, <code class="docutils literal notranslate"><span class="pre">eu-specify7-1.specifycloud.org.</span></code>, etc.). If the database name has underscores (_), replace these with dashes (-).</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">&lt;dbname&gt;</span></code> points to <code class="docutils literal notranslate"><span class="pre">&lt;subdomain&gt;.specifycloud.org.</span></code>
Expand Down Expand Up @@ -178,7 +189,7 @@ <h2>Example for <dbname><a class="headerlink" href="#example-for" title="Link to
</div>
<ol class="arabic simple">
<li><p>For automatic nginx reloading on certificate renewal create /etc/letsencrypt/renewal-hooks/post/reload-nginx.sh <code class="docutils literal notranslate"><span class="pre">#!/bin/bash</span> <span class="pre">docker</span> <span class="pre">exec</span> <span class="pre">-it</span> <span class="pre">specifycloud_nginx_1</span> <span class="pre">nginx</span> <span class="pre">-s</span> <span class="pre">reload</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">crontab</span> <span class="pre">-e;</span></code> and then add the line “0 3 * * 0,2,4,6 docker exec specifycloud_nginx_1 nginx -s reload</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">crontab</span> <span class="pre">-e;</span></code> and then add the line <code class="docutils literal notranslate"><span class="pre">0</span> <span class="pre">3</span> <span class="pre">*</span> <span class="pre">*</span> <span class="pre">0,2,4,6</span> <span class="pre">docker</span> <span class="pre">exec</span> <span class="pre">specifycloud_nginx_1</span> <span class="pre">nginx</span> <span class="pre">-s</span> <span class="pre">reload</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">crontab</span> <span class="pre">-l</span></code> to list cronjobs</p></li>
</ol>
</li>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit be6be8b

Please sign in to comment.