Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
comp90024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JiaJie Xu
comp90024
Commits
2875a6f8
Commit
2875a6f8
authored
2 years ago
by
Luca Morandini
Browse files
Options
Downloads
Patches
Plain Diff
- Removed a parameter that caused a warning on BASH
parent
2f165baa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
couchdb/README.md
+4
-5
4 additions, 5 deletions
couchdb/README.md
couchdb/macos/run.sh
+3
-3
3 additions, 3 deletions
couchdb/macos/run.sh
with
7 additions
and
8 deletions
couchdb/README.md
+
4
−
5
View file @
2875a6f8
...
...
@@ -16,16 +16,15 @@ The following instructions apply only to Linux-based systems; for MacOS please m
Set node IP addresses, electing the first as "master node"
and admin credentials (make sure you have no other Docker containers running):
```
shell script
export declare
-a
nodes=(172.17.0.4 172.17.0.3 172.17.0.2)
export declare nodes=(172.17.0.4 172.17.0.3 172.17.0.2)
export masternode=`echo ${nodes} | cut -f1 -d' '`
export declare
-a
othernodes=`echo ${nodes[@]} | sed s/${masternode}//`
export declare othernodes=`echo ${nodes[@]} | sed s/${masternode}//`
export size=${#nodes[@]}
export user='admin'
export pass='admin'
export VERSION='3.2.1'
export cookie='a192aeb9904e6590849337933b000c99'
```
(Ignore the
`bash: export: `
-a': not a valid identifier
` error if it were to appear.)
```
shell script
docker pull ibmcom/couchdb3:${VERSION}
...
...
@@ -56,7 +55,7 @@ done
Put in
`conts`
the Docker container IDs:
```
shell script
declare
-a
conts=(
`docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n${size} -d'\n'`
)
declare conts=(`docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n${size} -d'\n'`)
```
Start the containers (and wait a bit while they boot):
...
...
@@ -125,7 +124,7 @@ Fauxton user interface (`http://172.17.0.2:5984/_utils`).
Put in
`conts`
the Docker container IDs
```
shell script
declare
-a
conts=(
`docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n${size} -d'\n'`
)
declare conts=(`docker ps --all | grep couchdb | cut -f1 -d' ' | xargs -n${size} -d'\n'`)
```
Starts the cluster
...
...
This diff is collapsed.
Click to expand it.
couchdb/macos/run.sh
+
3
−
3
View file @
2875a6f8
#!/usr/bin/env bash
echo
"== Set variables =="
declare
-a
nodes
=(
172.20.0.2 172.20.0.3 172.20.0.4
)
declare
-a
ports
=(
5984 15984 25984
)
declare
nodes
=(
172.20.0.2 172.20.0.3 172.20.0.4
)
declare
ports
=(
5984 15984 25984
)
export
master_node
=
172.20.0.2
export
master_port
=
5984
export
size
=
${#
nodes
[@]
}
export
user
=
user
export
pass
=
pass
echo
"== Start the containers =="
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment