Skip to content

Commit 5b662e5

Browse files
Bala-Sakabattularalphbean
authored andcommitted
change the structure of readme.md
1 parent 78bcd26 commit 5b662e5

File tree

1 file changed

+52
-31
lines changed

1 file changed

+52
-31
lines changed

README.md

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,6 @@ Sync2Jira is a service that listens to activity on upstream GitHub repositories
4444
- GitHub API token
4545
- Fedora messaging environment (for production)
4646

47-
### Using Docker
48-
49-
```bash
50-
# Basic usage - run the sync service
51-
docker run -v /path/to/your/config:/etc/fedmsg.d/ \
52-
-e GITHUB_TOKEN=your_token \
53-
-e JIRA_TOKEN=your_jira_token \
54-
quay.io/redhat-services-prod/sync2jira/sync2jira:latest
55-
56-
# With initialization (sync all existing issues)
57-
docker run -v /path/to/your/config:/etc/fedmsg.d/ \
58-
-e GITHUB_TOKEN=your_token \
59-
-e JIRA_TOKEN=your_jira_token \
60-
-e INITIALIZE=1 \
61-
quay.io/redhat-services-prod/sync2jira/sync2jira:latest
62-
63-
```
64-
65-
**Note**: The `-v /path/to/your/config:/etc/fedmsg.d/` option mounts your local configuration directory inside the container, allowing the containerized application to use your host system's configuration files.
66-
6747
### From Source
6848

6949
```bash
@@ -88,6 +68,8 @@ INITIALIZE=1 sync2jira
8868
sync2jira
8969
```
9070

71+
**Note**: Container images are also available as an alternative to native installation. See the [Usage](#usage) section for container deployment instructions.
72+
9173
## Configuration
9274

9375
Create a configuration file in the `fedmsg.d/` directory. Here's a basic example:
@@ -152,24 +134,49 @@ config = {
152134

153135
## Usage
154136

155-
### Container Deployment
137+
### Sync2Jira Service
138+
139+
The main synchronization service that listens for GitHub events and creates/updates JIRA issues.
156140

157-
**Sync Page UI**
141+
#### Native Installation
158142

159143
```bash
160-
# Run the web interface for manual synchronization
144+
# Run the service
145+
sync2jira
146+
147+
# With initialization (sync all existing issues)
148+
INITIALIZE=1 sync2jira
149+
150+
# Testing mode (dry run)
151+
# Set testing: True in config file
152+
sync2jira
153+
```
154+
155+
#### Container Deployment
156+
157+
```bash
158+
# Basic usage - run the sync service
161159
docker run -v /path/to/your/config:/etc/fedmsg.d/ \
162-
-p 5000:5000 \
163160
-e GITHUB_TOKEN=your_token \
164161
-e JIRA_TOKEN=your_jira_token \
165-
quay.io/redhat-aqe/sync2jira:sync-page
162+
quay.io/redhat-services-prod/sync2jira/sync2jira:latest
163+
164+
# With initialization (sync all existing issues)
165+
docker run -v /path/to/your/config:/etc/fedmsg.d/ \
166+
-e GITHUB_TOKEN=your_token \
167+
-e JIRA_TOKEN=your_jira_token \
168+
-e INITIALIZE=1 \
169+
quay.io/redhat-services-prod/sync2jira/sync2jira:latest
166170
```
167171

168-
### Manual Sync Interface
172+
**Note**: The `-v /path/to/your/config:/etc/fedmsg.d/` option mounts your local configuration directory inside the container, allowing the containerized application to use your host system's configuration files.
173+
174+
### Sync Page UI
175+
176+
A web interface for manually triggering synchronization of specific repositories when needed.
169177

170-
The sync page is a separate web application that provides a UI for manually triggering synchronization.
178+
#### Native Installation
171179

172-
**Running the sync page locally:**
173180
```bash
174181
# Navigate to the sync-page directory
175182
cd sync-page
@@ -178,18 +185,32 @@ cd sync-page
178185
python event-handler.py
179186
```
180187

188+
#### Container Deployment
189+
190+
```bash
191+
# Run the web interface for manual synchronization
192+
docker run -v /path/to/your/config:/etc/fedmsg.d/ \
193+
-p 5000:5000 \
194+
-e GITHUB_TOKEN=your_token \
195+
-e JIRA_TOKEN=your_jira_token \
196+
quay.io/redhat-aqe/sync2jira:sync-page
197+
```
198+
181199
**Access the interface:**
182200
- Local development: `http://localhost:5000` (or whatever port Flask shows)
183201
- Production: Configure according to your deployment environment
184202

185-
186203
### Environment Variables
187204

188-
- `INITIALIZE`: Set to `1` to perform initial sync of all issues
189-
- `FEDORA_MESSAGING_QUEUE`: Custom message queue name
205+
The following environment variables can be used to configure both tools:
206+
207+
**Common Variables (used by both sync2jira and sync-page):**
190208
- `GITHUB_TOKEN`: GitHub API token (can override config)
191209
- `JIRA_TOKEN`: JIRA API token (can override config)
192210

211+
**Sync2Jira Service Only:**
212+
- `INITIALIZE`: Set to `1` to perform initial sync of all issues
213+
- `FEDORA_MESSAGING_QUEUE`: Custom message queue name
193214

194215
## Documentation
195216

0 commit comments

Comments
 (0)