ic-code 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ic_code-1.0.0/CHANGELOG.md +181 -0
- ic_code-1.0.0/LICENSE +21 -0
- ic_code-1.0.0/MANIFEST.in +77 -0
- ic_code-1.0.0/PKG-INFO +354 -0
- ic_code-1.0.0/README.md +305 -0
- ic_code-1.0.0/SECURITY.md +231 -0
- ic_code-1.0.0/aws/__init__.py +0 -0
- ic_code-1.0.0/aws/codepipeline/__init__.py +1 -0
- ic_code-1.0.0/aws/codepipeline/build.py +196 -0
- ic_code-1.0.0/aws/codepipeline/deploy.py +196 -0
- ic_code-1.0.0/aws/ec2/__init__.py +0 -0
- ic_code-1.0.0/aws/ec2/info.py +223 -0
- ic_code-1.0.0/aws/ec2/list_tags.py +119 -0
- ic_code-1.0.0/aws/ec2/tag_check.py +147 -0
- ic_code-1.0.0/aws/ecs/__init__.py +1 -0
- ic_code-1.0.0/aws/ecs/info.py +259 -0
- ic_code-1.0.0/aws/ecs/service.py +284 -0
- ic_code-1.0.0/aws/ecs/task.py +350 -0
- ic_code-1.0.0/aws/eks/__init__.py +1 -0
- ic_code-1.0.0/aws/eks/addons.py +321 -0
- ic_code-1.0.0/aws/eks/fargate.py +280 -0
- ic_code-1.0.0/aws/eks/info.py +254 -0
- ic_code-1.0.0/aws/eks/nodes.py +301 -0
- ic_code-1.0.0/aws/eks/pods.py +425 -0
- ic_code-1.0.0/aws/eks/update_config.py +251 -0
- ic_code-1.0.0/aws/fargate/__init__.py +1 -0
- ic_code-1.0.0/aws/fargate/info.py +292 -0
- ic_code-1.0.0/aws/lb/__init__.py +0 -0
- ic_code-1.0.0/aws/lb/info.py +193 -0
- ic_code-1.0.0/aws/lb/list_tags.py +128 -0
- ic_code-1.0.0/aws/lb/tag_check.py +144 -0
- ic_code-1.0.0/aws/msk/__init__.py +1 -0
- ic_code-1.0.0/aws/msk/broker.py +364 -0
- ic_code-1.0.0/aws/msk/info.py +304 -0
- ic_code-1.0.0/aws/nat/__init__.py +0 -0
- ic_code-1.0.0/aws/nat/list_tags.py +105 -0
- ic_code-1.0.0/aws/nat/tag_check.py +134 -0
- ic_code-1.0.0/aws/rds/__init__.py +0 -0
- ic_code-1.0.0/aws/rds/info.py +151 -0
- ic_code-1.0.0/aws/rds/list_tags.py +107 -0
- ic_code-1.0.0/aws/rds/tag_check.py +158 -0
- ic_code-1.0.0/aws/s3/__init__.py +0 -0
- ic_code-1.0.0/aws/s3/info.py +202 -0
- ic_code-1.0.0/aws/s3/list_tags.py +119 -0
- ic_code-1.0.0/aws/s3/tag_check.py +177 -0
- ic_code-1.0.0/aws/sg/__init__.py +1 -0
- ic_code-1.0.0/aws/sg/info.py +318 -0
- ic_code-1.0.0/aws/vpc/__init__.py +0 -0
- ic_code-1.0.0/aws/vpc/info.py +241 -0
- ic_code-1.0.0/aws/vpc/list_tags.py +301 -0
- ic_code-1.0.0/aws/vpc/tag_check.py +347 -0
- ic_code-1.0.0/aws/vpn/__init__.py +0 -0
- ic_code-1.0.0/aws/vpn/info.py +127 -0
- ic_code-1.0.0/azure_module/__init__.py +1 -0
- ic_code-1.0.0/azure_module/aci/info.py +506 -0
- ic_code-1.0.0/azure_module/aks/info.py +446 -0
- ic_code-1.0.0/azure_module/lb/info.py +547 -0
- ic_code-1.0.0/azure_module/nsg/info.py +443 -0
- ic_code-1.0.0/azure_module/storage/info.py +478 -0
- ic_code-1.0.0/azure_module/vm/info.py +469 -0
- ic_code-1.0.0/azure_module/vnet/info.py +421 -0
- ic_code-1.0.0/cf/__init__.py +0 -0
- ic_code-1.0.0/cf/dns/__init__.py +0 -0
- ic_code-1.0.0/cf/dns/list_info.py +242 -0
- ic_code-1.0.0/common/__init__.py +0 -0
- ic_code-1.0.0/common/azure_utils.py +308 -0
- ic_code-1.0.0/common/gather_env.py +226 -0
- ic_code-1.0.0/common/gcp_config_validator.py +340 -0
- ic_code-1.0.0/common/gcp_monitoring.py +311 -0
- ic_code-1.0.0/common/gcp_utils.py +665 -0
- ic_code-1.0.0/common/log.py +226 -0
- ic_code-1.0.0/common/slack.py +237 -0
- ic_code-1.0.0/common/utils.py +198 -0
- ic_code-1.0.0/config/default.yaml +140 -0
- ic_code-1.0.0/config/secrets.yaml.example +38 -0
- ic_code-1.0.0/docs/PYPI_DEPLOYMENT.md +192 -0
- ic_code-1.0.0/docs/README.md +52 -0
- ic_code-1.0.0/docs/aws/AWS_IMPLEMENTATION_SUMMARY.md +230 -0
- ic_code-1.0.0/docs/aws/README.md +285 -0
- ic_code-1.0.0/docs/aws/aws_cli_prd.md +317 -0
- ic_code-1.0.0/docs/configuration.md +453 -0
- ic_code-1.0.0/docs/deployment.md +359 -0
- ic_code-1.0.0/docs/final_validation_report.md +139 -0
- ic_code-1.0.0/docs/gcp/GCP_CONFIGURATION_GUIDE.md +1108 -0
- ic_code-1.0.0/docs/gcp/GCP_SECURITY_BEST_PRACTICES.md +608 -0
- ic_code-1.0.0/docs/installation.md +384 -0
- ic_code-1.0.0/docs/mcp_integration.md +231 -0
- ic_code-1.0.0/docs/migration.md +462 -0
- ic_code-1.0.0/docs/migration_guide.md +288 -0
- ic_code-1.0.0/docs/migration_history.md +156 -0
- ic_code-1.0.0/docs/security.md +469 -0
- ic_code-1.0.0/docs/troubleshooting.md +358 -0
- ic_code-1.0.0/docs/user_guide.md +237 -0
- ic_code-1.0.0/gcp/__init__.py +1 -0
- ic_code-1.0.0/gcp/billing/__init__.py +1 -0
- ic_code-1.0.0/gcp/billing/info.py +781 -0
- ic_code-1.0.0/gcp/compute/__init__.py +1 -0
- ic_code-1.0.0/gcp/compute/info.py +605 -0
- ic_code-1.0.0/gcp/firewall/__init__.py +1 -0
- ic_code-1.0.0/gcp/firewall/info.py +741 -0
- ic_code-1.0.0/gcp/functions/__init__.py +1 -0
- ic_code-1.0.0/gcp/functions/info.py +593 -0
- ic_code-1.0.0/gcp/gke/__init__.py +9 -0
- ic_code-1.0.0/gcp/gke/info.py +810 -0
- ic_code-1.0.0/gcp/lb/__init__.py +1 -0
- ic_code-1.0.0/gcp/lb/info.py +1020 -0
- ic_code-1.0.0/gcp/run/__init__.py +1 -0
- ic_code-1.0.0/gcp/run/info.py +749 -0
- ic_code-1.0.0/gcp/sql/__init__.py +1 -0
- ic_code-1.0.0/gcp/sql/info.py +632 -0
- ic_code-1.0.0/gcp/storage/__init__.py +1 -0
- ic_code-1.0.0/gcp/storage/info.py +591 -0
- ic_code-1.0.0/gcp/vpc/__init__.py +1 -0
- ic_code-1.0.0/gcp/vpc/info.py +703 -0
- ic_code-1.0.0/mcp/__init__.py +10 -0
- ic_code-1.0.0/mcp/gcp_connector.py +246 -0
- ic_code-1.0.0/oci_module/__init__.py +0 -0
- ic_code-1.0.0/oci_module/common/__init__.py +1 -0
- ic_code-1.0.0/oci_module/common/utils.py +40 -0
- ic_code-1.0.0/oci_module/cost/__init__.py +4 -0
- ic_code-1.0.0/oci_module/cost/credit.py +114 -0
- ic_code-1.0.0/oci_module/cost/usage.py +113 -0
- ic_code-1.0.0/oci_module/info/__init__.py +0 -0
- ic_code-1.0.0/oci_module/info/oci_info.py +1568 -0
- ic_code-1.0.0/oci_module/lb/__init__.py +2 -0
- ic_code-1.0.0/oci_module/lb/info.py +367 -0
- ic_code-1.0.0/oci_module/nsg/__init__.py +3 -0
- ic_code-1.0.0/oci_module/nsg/info.py +207 -0
- ic_code-1.0.0/oci_module/obj/__init__.py +1 -0
- ic_code-1.0.0/oci_module/obj/info.py +167 -0
- ic_code-1.0.0/oci_module/policy/__init__.py +4 -0
- ic_code-1.0.0/oci_module/policy/info.py +168 -0
- ic_code-1.0.0/oci_module/policy/search.py +222 -0
- ic_code-1.0.0/oci_module/vcn/__init__.py +1 -0
- ic_code-1.0.0/oci_module/vcn/info.py +241 -0
- ic_code-1.0.0/oci_module/vm/__init__.py +3 -0
- ic_code-1.0.0/oci_module/vm/info.py +248 -0
- ic_code-1.0.0/oci_module/volume/__init__.py +3 -0
- ic_code-1.0.0/oci_module/volume/info.py +144 -0
- ic_code-1.0.0/pyproject.toml +101 -0
- ic_code-1.0.0/requirements.txt +72 -0
- ic_code-1.0.0/scripts/bump-version.sh +205 -0
- ic_code-1.0.0/scripts/cf_edge_nsg_make/cf_edge_nsg_make.py +238 -0
- ic_code-1.0.0/scripts/deploy.sh +180 -0
- ic_code-1.0.0/scripts/final_validation_and_documentation.py +1353 -0
- ic_code-1.0.0/scripts/migration_execution_and_validation.py +544 -0
- ic_code-1.0.0/scripts/oracle-policy/user_policy.py +112 -0
- ic_code-1.0.0/scripts/performance_optimization.py +366 -0
- ic_code-1.0.0/scripts/setup_venv.py +285 -0
- ic_code-1.0.0/scripts/unset_env.sh +9 -0
- ic_code-1.0.0/scripts/validate_config.py +189 -0
- ic_code-1.0.0/setup.cfg +4 -0
- ic_code-1.0.0/setup.py +182 -0
- ic_code-1.0.0/src/ic/__init__.py +29 -0
- ic_code-1.0.0/src/ic/cli.py +769 -0
- ic_code-1.0.0/src/ic/commands/__init__.py +10 -0
- ic_code-1.0.0/src/ic/commands/config.py +699 -0
- ic_code-1.0.0/src/ic/compat/__init__.py +241 -0
- ic_code-1.0.0/src/ic/compat/cli.py +289 -0
- ic_code-1.0.0/src/ic/compat/common.py +243 -0
- ic_code-1.0.0/src/ic/config/__init__.py +10 -0
- ic_code-1.0.0/src/ic/config/cleanup.py +382 -0
- ic_code-1.0.0/src/ic/config/docs_organizer.py +587 -0
- ic_code-1.0.0/src/ic/config/external.py +456 -0
- ic_code-1.0.0/src/ic/config/manager.py +898 -0
- ic_code-1.0.0/src/ic/config/migration.py +628 -0
- ic_code-1.0.0/src/ic/config/schema.py +595 -0
- ic_code-1.0.0/src/ic/config/secrets.py +437 -0
- ic_code-1.0.0/src/ic/config/security.py +462 -0
- ic_code-1.0.0/src/ic/core/__init__.py +16 -0
- ic_code-1.0.0/src/ic/core/logging.py +311 -0
- ic_code-1.0.0/src/ic/core/mcp_manager.py +856 -0
- ic_code-1.0.0/src/ic/core/session.py +392 -0
- ic_code-1.0.0/src/ic/core/silence_logging.py +67 -0
- ic_code-1.0.0/src/ic_code.egg-info/PKG-INFO +354 -0
- ic_code-1.0.0/src/ic_code.egg-info/SOURCES.txt +181 -0
- ic_code-1.0.0/src/ic_code.egg-info/dependency_links.txt +1 -0
- ic_code-1.0.0/src/ic_code.egg-info/entry_points.txt +2 -0
- ic_code-1.0.0/src/ic_code.egg-info/requires.txt +18 -0
- ic_code-1.0.0/src/ic_code.egg-info/top_level.txt +1 -0
- ic_code-1.0.0/ssh/__init__.py +1 -0
- ic_code-1.0.0/ssh/auto_ssh.py +396 -0
- ic_code-1.0.0/ssh/server_info.py +503 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to IC (Infra Resource Management CLI) will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-01-03
|
|
9
|
+
|
|
10
|
+
### 🎉 Initial PyPI Release
|
|
11
|
+
|
|
12
|
+
This is the first official release of IC (Infra Resource Management CLI) on PyPI, featuring a complete restructure for modern Python packaging standards and enhanced security.
|
|
13
|
+
|
|
14
|
+
### ✨ Added
|
|
15
|
+
|
|
16
|
+
#### Package Structure & Distribution
|
|
17
|
+
- **Modern Python packaging** with `src/` layout and `pyproject.toml`
|
|
18
|
+
- **PyPI-ready distribution** with wheel and source packages
|
|
19
|
+
- **Comprehensive metadata** with security-focused descriptions
|
|
20
|
+
- **Pinned dependencies** for security and reproducibility
|
|
21
|
+
|
|
22
|
+
#### Security Features
|
|
23
|
+
- **SecurityManager** with automatic sensitive data masking
|
|
24
|
+
- **Git pre-commit hooks** for security validation
|
|
25
|
+
- **Configuration security validation** with warnings
|
|
26
|
+
- **Environment variable-based credential management**
|
|
27
|
+
- **Secure logging** with sensitive data masking in all outputs
|
|
28
|
+
|
|
29
|
+
#### Configuration Management
|
|
30
|
+
- **YAML-based configuration system** replacing .env files
|
|
31
|
+
- **Configuration hierarchy** (default → user → project → environment)
|
|
32
|
+
- **Schema validation** with comprehensive error messages
|
|
33
|
+
- **Migration utility** from .env to YAML configuration
|
|
34
|
+
- **Backward compatibility** with existing .env files
|
|
35
|
+
|
|
36
|
+
#### Enhanced Logging
|
|
37
|
+
- **Dual-level logging** (console ERROR only, file comprehensive)
|
|
38
|
+
- **Rich console output** with minimal noise
|
|
39
|
+
- **File-only INFO logging** for detailed operation tracking
|
|
40
|
+
- **Automatic log rotation** and cleanup
|
|
41
|
+
- **Sensitive data masking** in all log outputs
|
|
42
|
+
|
|
43
|
+
#### AWS Session Management
|
|
44
|
+
- **Intelligent profile detection** (assume_role vs direct credentials)
|
|
45
|
+
- **Session caching** for improved performance
|
|
46
|
+
- **Account alias resolution** with fallback to account ID
|
|
47
|
+
- **Enhanced error handling** and validation
|
|
48
|
+
|
|
49
|
+
#### MCP Integration
|
|
50
|
+
- **MCP server support** for AWS, Azure, Terraform, and GitHub
|
|
51
|
+
- **Secure MCP configuration loading** with sensitive data masking
|
|
52
|
+
- **Query methods** for different cloud platforms
|
|
53
|
+
- **Fallback mechanisms** for MCP server unavailability
|
|
54
|
+
|
|
55
|
+
#### Multi-Cloud Support
|
|
56
|
+
- **AWS**: EC2, ECS, EKS, Fargate, MSK, CodePipeline, LB, RDS, S3, VPC, VPN, Security Groups, NAT
|
|
57
|
+
- **Azure**: VM, VNet, AKS, Storage Account, NSG, Load Balancer, Container Instances
|
|
58
|
+
- **GCP**: Compute Engine, VPC Networks, GKE, Cloud Storage, Cloud SQL, Cloud Functions, Cloud Run, Load Balancing, Firewall Rules, Billing
|
|
59
|
+
- **OCI**: VM, LB, NSG, VCN, Volume, Object Storage, Policy, Cost
|
|
60
|
+
- **CloudFlare**: DNS record management
|
|
61
|
+
- **SSH**: Server status checking and automatic registration
|
|
62
|
+
|
|
63
|
+
#### Documentation & Security
|
|
64
|
+
- **Comprehensive security documentation** (SECURITY.md)
|
|
65
|
+
- **Configuration management guide** (docs/configuration.md)
|
|
66
|
+
- **Migration guide** (docs/migration.md)
|
|
67
|
+
- **Installation guide** (docs/installation.md)
|
|
68
|
+
- **Security-focused README** with best practices
|
|
69
|
+
|
|
70
|
+
### 🔧 Changed
|
|
71
|
+
|
|
72
|
+
#### Breaking Changes
|
|
73
|
+
- **Package structure** moved to `src/ic/` layout
|
|
74
|
+
- **Configuration system** now uses YAML instead of .env (with backward compatibility)
|
|
75
|
+
- **Logging behavior** changed to console ERROR only, file comprehensive
|
|
76
|
+
- **Import paths** updated for new structure (backward compatibility maintained)
|
|
77
|
+
|
|
78
|
+
#### Improvements
|
|
79
|
+
- **Performance optimizations** with session caching and parallel processing
|
|
80
|
+
- **Error handling** enhanced with detailed error messages
|
|
81
|
+
- **Output formatting** improved with Rich library integration
|
|
82
|
+
- **Security hardening** throughout the codebase
|
|
83
|
+
|
|
84
|
+
### 🛡️ Security
|
|
85
|
+
|
|
86
|
+
#### New Security Features
|
|
87
|
+
- **Automatic sensitive data masking** in logs and configuration
|
|
88
|
+
- **Git security validation** with pre-commit hooks
|
|
89
|
+
- **Configuration security warnings** for sensitive data
|
|
90
|
+
- **Secure credential management** with environment variables only
|
|
91
|
+
- **File permission validation** and recommendations
|
|
92
|
+
|
|
93
|
+
#### Security Best Practices
|
|
94
|
+
- **No secrets in configuration files** - environment variables only
|
|
95
|
+
- **Comprehensive .gitignore** for sensitive files
|
|
96
|
+
- **Security documentation** and guidelines
|
|
97
|
+
- **Vulnerability reporting process** established
|
|
98
|
+
|
|
99
|
+
### 📦 Dependencies
|
|
100
|
+
|
|
101
|
+
#### Updated Dependencies
|
|
102
|
+
- **boto3**: 1.40.59 (AWS SDK)
|
|
103
|
+
- **azure-***: Latest stable versions for Azure services
|
|
104
|
+
- **google-cloud-***: Latest stable versions for GCP services
|
|
105
|
+
- **oci**: 2.149.2 (Oracle Cloud Infrastructure)
|
|
106
|
+
- **rich**: 14.0.0 (Console formatting)
|
|
107
|
+
- **paramiko**: 4.0.1 (SSH client)
|
|
108
|
+
- **PyYAML**: 6.0.1 (YAML parsing)
|
|
109
|
+
|
|
110
|
+
#### New Dependencies
|
|
111
|
+
- **jsonschema**: 4.23.0 (Configuration validation)
|
|
112
|
+
- **cryptography**: 42.0.8 (Security utilities)
|
|
113
|
+
- **invoke**: 2.2.0 (Task execution)
|
|
114
|
+
|
|
115
|
+
### 🔄 Migration
|
|
116
|
+
|
|
117
|
+
#### From Previous Versions
|
|
118
|
+
1. **Install new version**: `pip install --upgrade ic`
|
|
119
|
+
2. **Migrate configuration**: `ic config migrate` (converts .env to YAML)
|
|
120
|
+
3. **Update imports**: Most imports remain compatible
|
|
121
|
+
4. **Review security**: Follow new security guidelines in SECURITY.md
|
|
122
|
+
|
|
123
|
+
#### Configuration Migration
|
|
124
|
+
```bash
|
|
125
|
+
# Automatic migration from .env to config.yaml
|
|
126
|
+
ic config migrate
|
|
127
|
+
|
|
128
|
+
# Validate new configuration
|
|
129
|
+
ic config validate
|
|
130
|
+
|
|
131
|
+
# Initialize secure configuration
|
|
132
|
+
ic config init
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 🐛 Fixed
|
|
136
|
+
- **Session management** reliability improvements
|
|
137
|
+
- **Error handling** for various edge cases
|
|
138
|
+
- **Memory usage** optimizations
|
|
139
|
+
- **Logging** consistency across modules
|
|
140
|
+
|
|
141
|
+
### 📋 Known Issues
|
|
142
|
+
- **Azure DevOps SDK**: Only beta versions available, commented out in dependencies
|
|
143
|
+
- **Large log files**: Automatic rotation helps but monitor disk usage
|
|
144
|
+
- **MCP server dependencies**: Requires separate MCP server setup for full functionality
|
|
145
|
+
|
|
146
|
+
### 🔮 Coming Soon
|
|
147
|
+
- **Additional cloud providers** support
|
|
148
|
+
- **Enhanced reporting** with Excel/CSV export
|
|
149
|
+
- **CI/CD integration** templates
|
|
150
|
+
- **Performance monitoring** and metrics
|
|
151
|
+
- **Advanced security scanning** integration
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Development Guidelines
|
|
156
|
+
|
|
157
|
+
### Version Numbering
|
|
158
|
+
- **Major** (X.0.0): Breaking changes, major new features
|
|
159
|
+
- **Minor** (1.X.0): New features, backward compatible
|
|
160
|
+
- **Patch** (1.0.X): Bug fixes, security patches
|
|
161
|
+
|
|
162
|
+
### Release Process
|
|
163
|
+
1. Update version in `src/ic/__init__.py`
|
|
164
|
+
2. Update CHANGELOG.md with new version
|
|
165
|
+
3. Create and test distribution packages
|
|
166
|
+
4. Tag release in Git
|
|
167
|
+
5. Upload to PyPI
|
|
168
|
+
6. Update documentation
|
|
169
|
+
|
|
170
|
+
### Security Releases
|
|
171
|
+
- **Critical vulnerabilities**: Immediate patch release
|
|
172
|
+
- **Security improvements**: Next minor release
|
|
173
|
+
- **Security documentation**: Continuous updates
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
For more information, see:
|
|
178
|
+
- [Security Policy](SECURITY.md)
|
|
179
|
+
- [Configuration Guide](docs/configuration.md)
|
|
180
|
+
- [Migration Guide](docs/migration.md)
|
|
181
|
+
- [GitHub Repository](https://github.com/dgr009/ic)
|
ic_code-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 IC CLI Tool
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Include documentation and configuration files
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include SECURITY.md
|
|
6
|
+
include requirements.txt
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
include setup.py
|
|
9
|
+
include setup.cfg
|
|
10
|
+
|
|
11
|
+
# Include configuration files and examples
|
|
12
|
+
recursive-include config *.yaml *.yml *.json *.example
|
|
13
|
+
recursive-include config/schema *.yaml *.yml *.json
|
|
14
|
+
recursive-include docs *.md *.rst *.txt
|
|
15
|
+
|
|
16
|
+
# Include scripts and tools
|
|
17
|
+
recursive-include scripts *.py *.sh *.bat
|
|
18
|
+
|
|
19
|
+
# Include source code
|
|
20
|
+
recursive-include src *.py
|
|
21
|
+
recursive-include src/ic/config *.yaml *.yml *.json
|
|
22
|
+
|
|
23
|
+
# Include service modules
|
|
24
|
+
recursive-include aws *.py
|
|
25
|
+
recursive-include azure_module *.py
|
|
26
|
+
recursive-include gcp *.py
|
|
27
|
+
recursive-include oci_module *.py
|
|
28
|
+
recursive-include ssh *.py
|
|
29
|
+
recursive-include cf *.py
|
|
30
|
+
recursive-include common *.py
|
|
31
|
+
recursive-include mcp *.py
|
|
32
|
+
|
|
33
|
+
# Include new configuration system files
|
|
34
|
+
include requirements-updated.txt
|
|
35
|
+
include activate_new_env.sh
|
|
36
|
+
include activate_new_env.bat
|
|
37
|
+
|
|
38
|
+
# Exclude development and build files
|
|
39
|
+
exclude .env
|
|
40
|
+
exclude .env.*
|
|
41
|
+
exclude *.key
|
|
42
|
+
exclude *.pem
|
|
43
|
+
exclude **/credentials.json
|
|
44
|
+
exclude **/service-account*.json
|
|
45
|
+
exclude **/*-key.json
|
|
46
|
+
exclude .DS_Store
|
|
47
|
+
exclude *.pyc
|
|
48
|
+
exclude *.pyo
|
|
49
|
+
exclude *.egg-info
|
|
50
|
+
exclude .pytest_cache
|
|
51
|
+
exclude __pycache__
|
|
52
|
+
recursive-exclude * __pycache__
|
|
53
|
+
recursive-exclude * *.py[co]
|
|
54
|
+
recursive-exclude * .DS_Store
|
|
55
|
+
recursive-exclude * *.key
|
|
56
|
+
recursive-exclude * *.pem
|
|
57
|
+
recursive-exclude * *credentials*
|
|
58
|
+
recursive-exclude * *service-account*
|
|
59
|
+
recursive-exclude logs *
|
|
60
|
+
recursive-exclude .git *
|
|
61
|
+
recursive-exclude .kiro *
|
|
62
|
+
recursive-exclude tests *
|
|
63
|
+
recursive-exclude .pytest_cache *
|
|
64
|
+
|
|
65
|
+
# Include test files only in source distribution
|
|
66
|
+
global-exclude tests/*
|
|
67
|
+
global-exclude test_*
|
|
68
|
+
global-exclude *_test.py
|
|
69
|
+
|
|
70
|
+
# Security: Exclude sensitive files
|
|
71
|
+
global-exclude *.key
|
|
72
|
+
global-exclude *.pem
|
|
73
|
+
global-exclude *credentials*
|
|
74
|
+
global-exclude *service-account*
|
|
75
|
+
global-exclude .env*
|
|
76
|
+
global-exclude config.yaml
|
|
77
|
+
global-exclude config.yml
|
ic_code-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ic-code
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Infrastructure CLI tool for managing AWS, CloudFlare, SSH, and more
|
|
5
|
+
Home-page: https://github.com/dgr009/ic
|
|
6
|
+
Author: SangYun Kim
|
|
7
|
+
Author-email: sykim <cruiser594@gmail.com>
|
|
8
|
+
Project-URL: Homepage, https://github.com/dgr009/ic
|
|
9
|
+
Project-URL: Bug Reports, https://github.com/dgr009/ic/issues
|
|
10
|
+
Project-URL: Source, https://github.com/dgr009/ic
|
|
11
|
+
Project-URL: Documentation, https://github.com/dgr009/ic#readme
|
|
12
|
+
Keywords: cli,infrastructure,aws,cloudflare,ssh,devops
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: System :: Systems Administration
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: boto3>=1.26.0
|
|
29
|
+
Requires-Dist: botocore>=1.29.0
|
|
30
|
+
Requires-Dist: requests>=2.28.0
|
|
31
|
+
Requires-Dist: rich>=12.0.0
|
|
32
|
+
Requires-Dist: PyYAML>=6.0
|
|
33
|
+
Requires-Dist: paramiko>=2.11.0
|
|
34
|
+
Requires-Dist: python-dotenv>=0.19.0
|
|
35
|
+
Requires-Dist: cryptography>=3.4.8
|
|
36
|
+
Requires-Dist: ipaddress>=1.0.23
|
|
37
|
+
Requires-Dist: netifaces>=0.11.0
|
|
38
|
+
Requires-Dist: tqdm>=4.67.0
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
42
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
43
|
+
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: mypy>=0.991; extra == "dev"
|
|
45
|
+
Dynamic: author
|
|
46
|
+
Dynamic: home-page
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
Dynamic: requires-python
|
|
49
|
+
|
|
50
|
+
# IC CLI Tool
|
|
51
|
+
|
|
52
|
+
[](https://github.com/yourusername/ic-cli/actions)
|
|
53
|
+
[](https://badge.fury.io/py/ic-code)
|
|
54
|
+
[](https://www.python.org/downloads/)
|
|
55
|
+
[](https://opensource.org/licenses/MIT)
|
|
56
|
+
|
|
57
|
+
Infrastructure Command Line Interface tool for managing various cloud services and infrastructure components.
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- **AWS Services**: EC2, S3, ECS, EKS, RDS, VPC, Load Balancers, MSK, and more
|
|
62
|
+
- **CloudFlare**: DNS record management with account/zone filtering
|
|
63
|
+
- **SSH**: Server information gathering and management with security filtering
|
|
64
|
+
- **OCI**: Oracle Cloud Infrastructure support
|
|
65
|
+
- **Multi-account/Multi-region**: Support for multiple AWS accounts and regions
|
|
66
|
+
- **Rich Output**: Beautiful terminal output with tables and colors
|
|
67
|
+
- **YAML Configuration**: Modern YAML-based configuration management
|
|
68
|
+
- **Security**: Separate secrets management with example templates
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
71
|
+
|
|
72
|
+
### From PyPI (Recommended)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install ic-code
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### From Source
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Clone the repository
|
|
82
|
+
git clone https://github.com/dgr009/ic.git
|
|
83
|
+
cd ic
|
|
84
|
+
|
|
85
|
+
# Create virtual environment
|
|
86
|
+
python -m venv ic-env
|
|
87
|
+
source ic-env/bin/activate # On Windows: ic-env\Scripts\activate
|
|
88
|
+
|
|
89
|
+
# Install in development mode
|
|
90
|
+
pip install -e .
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
### YAML Configuration System
|
|
96
|
+
|
|
97
|
+
IC CLI uses a modern YAML-based configuration system with separate files for default settings and secrets.
|
|
98
|
+
|
|
99
|
+
#### 1. Create Configuration Files
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Copy example files
|
|
103
|
+
cp config/secrets.yaml.example config/secrets.yaml
|
|
104
|
+
|
|
105
|
+
# Edit with your actual values
|
|
106
|
+
vim config/secrets.yaml
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### 2. Configure Secrets (config/secrets.yaml)
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
# AWS Configuration
|
|
113
|
+
aws:
|
|
114
|
+
accounts:
|
|
115
|
+
- "123456789012" # Your AWS account IDs
|
|
116
|
+
- "987654321098"
|
|
117
|
+
profiles:
|
|
118
|
+
default: "your-aws-profile-name"
|
|
119
|
+
|
|
120
|
+
# CloudFlare Configuration
|
|
121
|
+
cloudflare:
|
|
122
|
+
email: "your-email@example.com"
|
|
123
|
+
api_token: "your-cloudflare-api-token"
|
|
124
|
+
cloudflare_accounts: "account1,account2" # Filter accounts
|
|
125
|
+
cloudflare_zones: "zone1,zone2" # Filter zones
|
|
126
|
+
|
|
127
|
+
# SSH Configuration (Security-sensitive)
|
|
128
|
+
ssh:
|
|
129
|
+
key_dir: "~/aws-key"
|
|
130
|
+
skip_prefixes: # Skip servers with these prefixes
|
|
131
|
+
- "git"
|
|
132
|
+
- "bastion"
|
|
133
|
+
- "jump"
|
|
134
|
+
- "proxy"
|
|
135
|
+
|
|
136
|
+
# OCI Configuration
|
|
137
|
+
oci:
|
|
138
|
+
config_file: "~/.oci/config"
|
|
139
|
+
profile: "DEFAULT"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### 3. Default Settings (config/default.yaml)
|
|
143
|
+
|
|
144
|
+
The default configuration is already provided and includes:
|
|
145
|
+
- AWS regions
|
|
146
|
+
- SSH connection settings
|
|
147
|
+
- Timeout values
|
|
148
|
+
- Other non-sensitive defaults
|
|
149
|
+
|
|
150
|
+
### AWS Credentials
|
|
151
|
+
|
|
152
|
+
Ensure your AWS credentials are configured:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Using AWS CLI
|
|
156
|
+
aws configure
|
|
157
|
+
|
|
158
|
+
# Or use AWS profiles
|
|
159
|
+
aws configure --profile myprofile
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Usage
|
|
163
|
+
|
|
164
|
+
### AWS Services
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# EC2 instances
|
|
168
|
+
ic aws ec2 info
|
|
169
|
+
ic aws ec2 info --account 123456789012 --regions us-east-1
|
|
170
|
+
|
|
171
|
+
# S3 buckets
|
|
172
|
+
ic aws s3 list_tags
|
|
173
|
+
ic aws s3 tag_check
|
|
174
|
+
|
|
175
|
+
# ECS services
|
|
176
|
+
ic aws ecs info
|
|
177
|
+
ic aws ecs service
|
|
178
|
+
ic aws ecs task
|
|
179
|
+
|
|
180
|
+
# EKS clusters
|
|
181
|
+
ic aws eks info
|
|
182
|
+
ic aws eks nodes
|
|
183
|
+
ic aws eks pods
|
|
184
|
+
|
|
185
|
+
# RDS instances
|
|
186
|
+
ic aws rds list_tags
|
|
187
|
+
ic aws rds tag_check
|
|
188
|
+
|
|
189
|
+
# Load Balancers
|
|
190
|
+
ic aws lb list_tags
|
|
191
|
+
ic aws lb tag_check
|
|
192
|
+
|
|
193
|
+
# VPC resources
|
|
194
|
+
ic aws vpc list_tags
|
|
195
|
+
ic aws vpc tag_check
|
|
196
|
+
|
|
197
|
+
# Security Groups
|
|
198
|
+
ic aws sg info
|
|
199
|
+
|
|
200
|
+
# MSK clusters
|
|
201
|
+
ic aws msk info
|
|
202
|
+
ic aws msk broker
|
|
203
|
+
|
|
204
|
+
# Fargate services
|
|
205
|
+
ic aws fargate info
|
|
206
|
+
|
|
207
|
+
# CodePipeline
|
|
208
|
+
ic aws codepipeline build
|
|
209
|
+
ic aws codepipeline deploy
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### CloudFlare
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# DNS records (filtered by configured accounts/zones)
|
|
216
|
+
ic cf dns info
|
|
217
|
+
ic cf dns info --account specific-account
|
|
218
|
+
ic cf dns info --zone specific-zone
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### SSH Management
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Server information (with security filtering)
|
|
225
|
+
ic ssh info
|
|
226
|
+
|
|
227
|
+
# Auto-discover and register SSH servers
|
|
228
|
+
ic ssh reg
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### OCI (Oracle Cloud Infrastructure)
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# OCI information
|
|
235
|
+
ic oci info
|
|
236
|
+
|
|
237
|
+
# VM instances
|
|
238
|
+
ic oci vm
|
|
239
|
+
|
|
240
|
+
# Load balancers
|
|
241
|
+
ic oci lb
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Configuration Management
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# View current configuration
|
|
248
|
+
ic config show
|
|
249
|
+
|
|
250
|
+
# Validate configuration
|
|
251
|
+
ic config validate
|
|
252
|
+
|
|
253
|
+
# Migrate from old configuration
|
|
254
|
+
ic config migrate
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Command Structure
|
|
258
|
+
|
|
259
|
+
The CLI follows a consistent structure:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
ic <platform> <service> <command> [options]
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
- **platform**: aws, cf (CloudFlare), ssh, oci, config
|
|
266
|
+
- **service**: ec2, s3, ecs, eks, rds, etc.
|
|
267
|
+
- **command**: info, list_tags, tag_check, etc.
|
|
268
|
+
- **options**: --account, --regions, --name, etc.
|
|
269
|
+
|
|
270
|
+
## Examples
|
|
271
|
+
|
|
272
|
+
### Multi-account AWS EC2 Query
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Query EC2 instances across multiple accounts and regions
|
|
276
|
+
ic aws ec2 info --account 123456789012,987654321098 --regions us-east-1,ap-northeast-2
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### CloudFlare DNS Management
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# List all DNS records
|
|
283
|
+
ic cf dns info
|
|
284
|
+
|
|
285
|
+
# Filter by specific account
|
|
286
|
+
ic cf dns info --account production
|
|
287
|
+
|
|
288
|
+
# Filter by specific zone
|
|
289
|
+
ic cf dns info --zone example.com
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### SSH Server Discovery
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Get information about all registered SSH servers
|
|
296
|
+
ic ssh info
|
|
297
|
+
|
|
298
|
+
# Auto-discover new SSH servers in your network
|
|
299
|
+
ic ssh reg
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Development
|
|
303
|
+
|
|
304
|
+
### Project Structure
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
ic/
|
|
308
|
+
├── src/ic/
|
|
309
|
+
│ ├── cli.py # Main CLI entry point
|
|
310
|
+
│ ├── config/ # Configuration management
|
|
311
|
+
│ └── core/ # Core utilities
|
|
312
|
+
├── aws/ # AWS service modules
|
|
313
|
+
├── cf/ # CloudFlare modules
|
|
314
|
+
├── ssh/ # SSH management modules
|
|
315
|
+
├── oci_module/ # OCI modules
|
|
316
|
+
├── common/ # Common utilities
|
|
317
|
+
├── config/ # Configuration files
|
|
318
|
+
├── requirements.txt # Python dependencies
|
|
319
|
+
└── README.md # This file
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Adding New Services
|
|
323
|
+
|
|
324
|
+
1. Create a new module directory (e.g., `gcp/`)
|
|
325
|
+
2. Implement service-specific functions
|
|
326
|
+
3. Add CLI integration in `src/ic/cli.py`
|
|
327
|
+
4. Update documentation
|
|
328
|
+
|
|
329
|
+
### Testing
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
# Run tests
|
|
333
|
+
pytest
|
|
334
|
+
|
|
335
|
+
# Run with coverage
|
|
336
|
+
pytest --cov=src --cov-report=html
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Contributing
|
|
340
|
+
|
|
341
|
+
1. Fork the repository
|
|
342
|
+
2. Create a feature branch
|
|
343
|
+
3. Make your changes
|
|
344
|
+
4. Add tests
|
|
345
|
+
5. Submit a pull request
|
|
346
|
+
|
|
347
|
+
## License
|
|
348
|
+
|
|
349
|
+
MIT License - see LICENSE file for details.
|
|
350
|
+
|
|
351
|
+
## Support
|
|
352
|
+
|
|
353
|
+
For issues and questions, please use the GitHub issue tracker.$`
|
|
354
|
+
|