ic-code 1.0.7__tar.gz → 1.0.9__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.9/PKG-INFO +1724 -0
- ic_code-1.0.9/README.md +1666 -0
- ic_code-1.0.9/common/ncp_security_utils.py +602 -0
- ic_code-1.0.9/common/ncp_utils.py +795 -0
- ic_code-1.0.9/common/ncpgov_utils.py +542 -0
- ic_code-1.0.9/docs/README.md +126 -0
- ic_code-1.0.9/docs/_templates/configuration.md +196 -0
- ic_code-1.0.9/docs/_templates/installation.md +79 -0
- ic_code-1.0.9/docs/_templates/troubleshooting.md +414 -0
- ic_code-1.0.9/docs/_templates/usage.md +290 -0
- ic_code-1.0.9/docs/aws/README.md +78 -0
- ic_code-1.0.9/docs/aws/installation.md +121 -0
- ic_code-1.0.9/docs/azure/README.md +27 -0
- ic_code-1.0.9/docs/gcp/README.md +38 -0
- ic_code-1.0.9/docs/general/configuration.md +190 -0
- ic_code-1.0.9/docs/ncp/README.md +26 -0
- ic_code-1.0.9/docs/ncp/configuration.md +297 -0
- ic_code-1.0.9/docs/ncp/installation.md +152 -0
- ic_code-1.0.9/docs/ncp/troubleshooting.md +406 -0
- ic_code-1.0.9/docs/ncp/usage.md +508 -0
- ic_code-1.0.9/docs/ncpgov/README.md +26 -0
- ic_code-1.0.9/docs/ncpgov/installation.md +251 -0
- ic_code-1.0.9/docs/oci/README.md +27 -0
- ic_code-1.0.9/docs/oci/installation.md +84 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/pyproject.toml +6 -6
- {ic_code-1.0.7 → ic_code-1.0.9}/requirements.txt +6 -3
- ic_code-1.0.9/scripts/analysis_summary.py +436 -0
- ic_code-1.0.9/scripts/cli_usage_analysis.py +780 -0
- ic_code-1.0.9/scripts/dependency_mapper.py +802 -0
- ic_code-1.0.9/scripts/fix_consolidated_imports.py +96 -0
- ic_code-1.0.9/scripts/ncp_security_scanner.py +649 -0
- ic_code-1.0.9/scripts/validate_ncp_security.py +329 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/setup.py +7 -6
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/cli.py +702 -47
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/commands/config.py +545 -38
- ic_code-1.0.9/src/ic/commands/migration.py +506 -0
- ic_code-1.0.9/src/ic/commands/security.py +262 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/manager.py +601 -30
- ic_code-1.0.9/src/ic/config/migration_utils.py +476 -0
- ic_code-1.0.9/src/ic/config/path_manager.py +580 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/security.py +408 -2
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/logging.py +4 -3
- ic_code-1.0.9/src/ic/migration/__init__.py +47 -0
- ic_code-1.0.9/src/ic/migration/manager.py +422 -0
- ic_code-1.0.9/src/ic/migration/post_validation.py +932 -0
- ic_code-1.0.9/src/ic/migration/rollback.py +793 -0
- ic_code-1.0.9/src/ic/migration/validation.py +843 -0
- ic_code-1.0.9/src/ic/platforms/__init__.py +1 -0
- {ic_code-1.0.7/cf → ic_code-1.0.9/src/ic/platforms/cloudflare}/dns/list_info.py +3 -3
- ic_code-1.0.9/src/ic/platforms/ncp/__init__.py +2 -0
- ic_code-1.0.9/src/ic/platforms/ncp/client.py +683 -0
- ic_code-1.0.9/src/ic/platforms/ncp/ec2/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncp/ec2/info.py +364 -0
- ic_code-1.0.9/src/ic/platforms/ncp/rds/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncp/rds/info.py +430 -0
- ic_code-1.0.9/src/ic/platforms/ncp/s3/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncp/s3/info.py +427 -0
- ic_code-1.0.9/src/ic/platforms/ncp/sg/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncp/sg/info.py +504 -0
- ic_code-1.0.9/src/ic/platforms/ncp/vpc/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncp/vpc/info.py +531 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/__init__.py +2 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/client.py +395 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/ec2/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/ec2/info.py +417 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/rds/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/rds/info.py +488 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/s3/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/s3/info.py +434 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/sg/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/sg/info.py +487 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/vpc/__init__.py +1 -0
- ic_code-1.0.9/src/ic/platforms/ncpgov/vpc/info.py +464 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/lb/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/nsg/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/obj/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/policy/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/vcn/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/vm/info.py +1 -1
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/volume/info.py +1 -1
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/ssh/auto_ssh.py +12 -2
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/ssh/server_info.py +6 -1
- ic_code-1.0.9/src/ic/security/__init__.py +26 -0
- ic_code-1.0.9/src/ic/security/config.py +180 -0
- ic_code-1.0.9/src/ic/security/detector.py +224 -0
- ic_code-1.0.9/src/ic/security/guidance.py +383 -0
- ic_code-1.0.9/src/ic/security/hooks.py +269 -0
- ic_code-1.0.9/src/ic/security/patterns.py +213 -0
- ic_code-1.0.9/src/ic/security/scanner.py +210 -0
- ic_code-1.0.9/src/ic_code.egg-info/PKG-INFO +1724 -0
- ic_code-1.0.9/src/ic_code.egg-info/SOURCES.txt +253 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic_code.egg-info/requires.txt +2 -2
- ic_code-1.0.7/PKG-INFO +0 -879
- ic_code-1.0.7/README.md +0 -821
- ic_code-1.0.7/docs/PYPI_DEPLOYMENT.md +0 -192
- ic_code-1.0.7/docs/README.md +0 -52
- ic_code-1.0.7/docs/aws/README.md +0 -285
- ic_code-1.0.7/docs/configuration.md +0 -455
- ic_code-1.0.7/docs/dependency_management.md +0 -281
- ic_code-1.0.7/docs/final_validation_report.md +0 -139
- ic_code-1.0.7/docs/migration_history.md +0 -156
- ic_code-1.0.7/src/ic_code.egg-info/PKG-INFO +0 -879
- ic_code-1.0.7/src/ic_code.egg-info/SOURCES.txt +0 -191
- {ic_code-1.0.7 → ic_code-1.0.9}/CHANGELOG.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/LICENSE +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/MANIFEST.in +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/SECURITY.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/azure_utils.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/gather_env.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/gcp_config_validator.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/gcp_monitoring.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/gcp_utils.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/log.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/progress_decorator.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/slack.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/common/utils.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/aws/AWS_IMPLEMENTATION_SUMMARY.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/aws/aws_cli_prd.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/config_migration.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/deployment.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/gcp/GCP_CONFIGURATION_GUIDE.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/gcp/GCP_SECURITY_BEST_PRACTICES.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/installation.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/mcp_integration.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/migration.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/migration_guide.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/security.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/troubleshooting.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/docs/user_guide.md +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/mcp/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/mcp/gcp_connector.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/bump-version.sh +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/cf_edge_nsg_make/cf_edge_nsg_make.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/deploy.sh +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/final_validation_and_documentation.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/migration_execution_and_validation.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/oracle-policy/user_policy.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/performance_optimization.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/setup_venv.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/unset_env.sh +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/validate_config.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/scripts/validate_dependencies.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/setup.cfg +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/commands/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/compat/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/compat/cli.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/compat/common.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/cleanup.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/docs_organizer.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/external.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/installer.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/migration.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/schema.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/config/secrets.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/dependency_validator.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/mcp_manager.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/session.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic/core/silence_logging.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/cloudfront/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/cloudfront/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/codepipeline/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/codepipeline/build.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/codepipeline/deploy.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ec2/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ec2/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ec2/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ec2/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ecs/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ecs/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ecs/service.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/ecs/task.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/addons.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/fargate.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/nodes.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/pods.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/eks/update_config.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/fargate/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/fargate/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/lb/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/lb/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/lb/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/lb/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/msk/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/msk/broker.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/msk/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/nat/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/nat/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/nat/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/profile/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/profile/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/rds/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/rds/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/rds/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/rds/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/s3/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/s3/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/s3/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/s3/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/sg/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/sg/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpc/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpc/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpc/list_tags.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpc/tag_check.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpn/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/aws/vpn/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/__init__.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/aci/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/aks/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/lb/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/nsg/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/storage/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/vm/info.py +0 -0
- {ic_code-1.0.7/azure_module → ic_code-1.0.9/src/ic/platforms/azure}/vnet/info.py +0 -0
- {ic_code-1.0.7/cf → ic_code-1.0.9/src/ic/platforms/cloudflare}/__init__.py +0 -0
- {ic_code-1.0.7/cf → ic_code-1.0.9/src/ic/platforms/cloudflare}/dns/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/billing/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/billing/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/compute/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/compute/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/firewall/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/firewall/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/functions/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/functions/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/gke/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/gke/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/lb/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/lb/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/run/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/run/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/sql/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/sql/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/storage/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/storage/info.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/vpc/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/gcp/vpc/info.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/common/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/common/utils.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/compartment/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/compartment/info.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/cost/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/cost/credit.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/cost/usage.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/info/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/info/oci_info.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/lb/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/nsg/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/obj/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/policy/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/policy/search.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/vcn/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/vm/__init__.py +0 -0
- {ic_code-1.0.7/oci_module → ic_code-1.0.9/src/ic/platforms/oci}/volume/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9/src/ic/platforms}/ssh/__init__.py +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic_code.egg-info/dependency_links.txt +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic_code.egg-info/entry_points.txt +0 -0
- {ic_code-1.0.7 → ic_code-1.0.9}/src/ic_code.egg-info/top_level.txt +0 -0
ic_code-1.0.9/PKG-INFO
ADDED
|
@@ -0,0 +1,1724 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ic-code
|
|
3
|
+
Version: 1.0.9
|
|
4
|
+
Summary: Infrastructure CLI tool for managing AWS, Azure, GCP, OCI, NCP, 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,oci,gcp,azure,ncp,naver-cloud,cloudflare,ssh,devops,multi-cloud
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
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
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Classifier: Environment :: Console
|
|
27
|
+
Requires-Python: >=3.9,<3.13
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: boto3<2.0.0,>=1.26.0
|
|
31
|
+
Requires-Dist: botocore<2.0.0,>=1.29.0
|
|
32
|
+
Requires-Dist: requests<3.0.0,>=2.28.0
|
|
33
|
+
Requires-Dist: rich<15.0.0,>=12.0.0
|
|
34
|
+
Requires-Dist: PyYAML<7.0.0,>=6.0
|
|
35
|
+
Requires-Dist: paramiko<5.0.0,>=2.11.0
|
|
36
|
+
Requires-Dist: python-dotenv<2.0.0,>=0.19.0
|
|
37
|
+
Requires-Dist: cryptography<50.0.0,>=3.4.8
|
|
38
|
+
Requires-Dist: netifaces<1.0.0,>=0.11.0
|
|
39
|
+
Requires-Dist: tqdm<5.0.0,>=4.67.0
|
|
40
|
+
Requires-Dist: jsonschema<5.0.0,>=4.23.0
|
|
41
|
+
Requires-Dist: python-dateutil<3.0.0,>=2.8.0
|
|
42
|
+
Requires-Dist: click<9.0.0,>=8.0.0
|
|
43
|
+
Requires-Dist: packaging<25.0,>=21.0
|
|
44
|
+
Requires-Dist: setuptools<71.0,>=61.0
|
|
45
|
+
Requires-Dist: watchdog<4.0.0,>=3.0.0
|
|
46
|
+
Requires-Dist: cerberus<2.0.0,>=1.3.4
|
|
47
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
50
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
51
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
52
|
+
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
53
|
+
Requires-Dist: mypy>=0.991; extra == "dev"
|
|
54
|
+
Dynamic: author
|
|
55
|
+
Dynamic: home-page
|
|
56
|
+
Dynamic: license-file
|
|
57
|
+
Dynamic: requires-python
|
|
58
|
+
|
|
59
|
+
# IC CLI Tool
|
|
60
|
+
|
|
61
|
+
[](https://github.com/dgr009/ic/actions)
|
|
62
|
+
[](https://badge.fury.io/py/ic-code)
|
|
63
|
+
[](https://www.python.org/downloads/)
|
|
64
|
+
[](https://opensource.org/licenses/MIT)
|
|
65
|
+
|
|
66
|
+
A comprehensive Infrastructure Command Line Interface tool for managing cloud services and infrastructure components across multiple platforms. IC CLI provides unified access to AWS, Oracle Cloud Infrastructure (OCI), NCP (Naver Cloud Platform), CloudFlare, and SSH server management with rich progress indicators and secure configuration management.
|
|
67
|
+
|
|
68
|
+
## ✨ Features
|
|
69
|
+
|
|
70
|
+
- **🚀 Multi-Cloud Support**: AWS, OCI, NCP (Naver Cloud Platform), CloudFlare, SSH server management
|
|
71
|
+
- **📊 Rich Progress Bars**: Real-time progress indicators for all long-running operations
|
|
72
|
+
- **🔒 Secure Configuration**: YAML-based configuration with separate secrets management
|
|
73
|
+
- **🌍 Multi-Account/Multi-Region**: Support for multiple cloud accounts and regions
|
|
74
|
+
- **🎨 Beautiful Output**: Rich terminal output with tables, colors, and formatting
|
|
75
|
+
- **⚡ High Performance**: Optimized for speed with concurrent operations
|
|
76
|
+
- **🛡️ Security First**: Built-in security validation and credential protection
|
|
77
|
+
|
|
78
|
+
### Supported Services
|
|
79
|
+
|
|
80
|
+
#### AWS Services (Production Ready)
|
|
81
|
+
- **Compute**: EC2 instances, ECS services, EKS clusters, Fargate
|
|
82
|
+
- **Storage**: S3 buckets, RDS databases
|
|
83
|
+
- **Networking**: VPC, Load Balancers, Security Groups, VPN
|
|
84
|
+
- **Other**: CloudFront distributions, MSK clusters, CodePipeline
|
|
85
|
+
|
|
86
|
+
#### Oracle Cloud Infrastructure (Production Ready)
|
|
87
|
+
- **Compute**: VM instances, Container Instances
|
|
88
|
+
- **Networking**: VCN, Load Balancers, Network Security Groups
|
|
89
|
+
- **Storage**: Block volumes, Object storage
|
|
90
|
+
- **Management**: Compartments, Policies, Cost analysis
|
|
91
|
+
|
|
92
|
+
#### CloudFlare (Production Ready)
|
|
93
|
+
- **DNS**: Zone and record management with filtering
|
|
94
|
+
|
|
95
|
+
#### SSH Management (Production Ready)
|
|
96
|
+
- **Server Discovery**: Automatic server registration and information gathering
|
|
97
|
+
- **Security**: Built-in security filtering and connection management
|
|
98
|
+
|
|
99
|
+
#### NCP Services (Production Ready)
|
|
100
|
+
- **Compute**: EC2 instances with detailed information and filtering
|
|
101
|
+
- **Storage**: S3 buckets with size and object count information
|
|
102
|
+
- **Networking**: VPC networks, subnets, and routing information
|
|
103
|
+
- **Database**: RDS instances with engine details and configuration
|
|
104
|
+
- **Security**: Security Groups with inbound/outbound rules
|
|
105
|
+
- **Government Cloud**: NCP Gov support with enhanced security compliance
|
|
106
|
+
|
|
107
|
+
#### Development Status
|
|
108
|
+
- **⚠️ Azure**: In development - usable but may contain bugs
|
|
109
|
+
- **⚠️ GCP**: In development - usable but may contain bugs
|
|
110
|
+
|
|
111
|
+
## 📦 Installation
|
|
112
|
+
|
|
113
|
+
### Prerequisites
|
|
114
|
+
|
|
115
|
+
- **Python**: 3.9 or higher (3.11.13 recommended)
|
|
116
|
+
- **Operating System**: macOS, Linux, or Windows
|
|
117
|
+
- **Dependencies**: All dependencies are automatically installed via pip
|
|
118
|
+
|
|
119
|
+
### From PyPI (Recommended)
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Install the latest stable version with full platform support
|
|
123
|
+
pip install ic-code
|
|
124
|
+
|
|
125
|
+
# Verify installation and platform support
|
|
126
|
+
ic --help
|
|
127
|
+
ic ncp --help # Verify NCP support
|
|
128
|
+
ic ncpgov --help # Verify NCP Government Cloud support
|
|
129
|
+
|
|
130
|
+
# Test NCP dependencies
|
|
131
|
+
python -c "from ncp_module.client import NCPClient; print('NCP support: OK')"
|
|
132
|
+
python -c "from ncpgov_module.client import NCPGovClient; print('NCP Gov support: OK')"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### From Source (Development)
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Clone the repository
|
|
139
|
+
git clone https://github.com/dgr009/ic.git
|
|
140
|
+
cd ic
|
|
141
|
+
|
|
142
|
+
# Create and activate virtual environment
|
|
143
|
+
python -m venv ic-env
|
|
144
|
+
source ic-env/bin/activate # On Windows: ic-env\Scripts\activate
|
|
145
|
+
|
|
146
|
+
# Install dependencies
|
|
147
|
+
pip install -r requirements.txt
|
|
148
|
+
|
|
149
|
+
# Install in development mode
|
|
150
|
+
pip install -e .
|
|
151
|
+
|
|
152
|
+
# Verify installation
|
|
153
|
+
ic --help
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Dependency Validation
|
|
157
|
+
|
|
158
|
+
IC CLI automatically validates all required dependencies on startup and provides clear error messages for missing packages. The tool supports **Python 3.9-3.12** with **Python 3.11.13** recommended for optimal performance.
|
|
159
|
+
|
|
160
|
+
#### Automatic Validation
|
|
161
|
+
```bash
|
|
162
|
+
# IC CLI validates dependencies automatically
|
|
163
|
+
ic --help # Will show dependency errors if any exist
|
|
164
|
+
|
|
165
|
+
# Manual dependency validation
|
|
166
|
+
python scripts/validate_dependencies.py
|
|
167
|
+
|
|
168
|
+
# Comprehensive compatibility testing
|
|
169
|
+
python scripts/test_dependency_compatibility.py --report
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### Troubleshooting Dependencies
|
|
173
|
+
```bash
|
|
174
|
+
# Check Python version compatibility
|
|
175
|
+
python --version # Should be 3.9+ to 3.12
|
|
176
|
+
|
|
177
|
+
# Install/update all dependencies
|
|
178
|
+
pip install --upgrade -r requirements.txt
|
|
179
|
+
|
|
180
|
+
# Install missing dependencies automatically
|
|
181
|
+
python scripts/validate_dependencies.py --install-missing
|
|
182
|
+
|
|
183
|
+
# Test requirements.txt installation
|
|
184
|
+
python scripts/validate_dependencies.py --test-requirements
|
|
185
|
+
|
|
186
|
+
# Validate specific platform dependencies
|
|
187
|
+
python scripts/validate_dependencies.py --platforms aws oci ncp
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
#### NCP-Specific Dependencies
|
|
191
|
+
|
|
192
|
+
IC CLI includes built-in NCP support without requiring separate SDK installation:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# NCP dependencies are included with IC CLI
|
|
196
|
+
pip install ic-code # Includes all NCP dependencies
|
|
197
|
+
|
|
198
|
+
# Verify NCP support is available
|
|
199
|
+
ic ncp --help # Should show NCP commands
|
|
200
|
+
ic ncpgov --help # Should show NCP Gov commands
|
|
201
|
+
|
|
202
|
+
# Test NCP connectivity (requires configuration)
|
|
203
|
+
ic ncp ec2 info --dry-run # Test NCP API connectivity
|
|
204
|
+
ic ncpgov ec2 info --dry-run # Test NCP Gov API connectivity
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Core NCP Dependencies (automatically installed):**
|
|
208
|
+
- `requests>=2.28.0` - HTTP client for NCP API calls
|
|
209
|
+
- `PyYAML>=6.0` - Configuration file parsing
|
|
210
|
+
- `cryptography>=3.4.8` - HMAC-SHA256 signature generation
|
|
211
|
+
- `rich>=12.0.0` - Terminal output formatting
|
|
212
|
+
|
|
213
|
+
**Manual NCP Dependency Installation (if needed):**
|
|
214
|
+
```bash
|
|
215
|
+
# Install NCP-specific dependencies manually
|
|
216
|
+
pip install requests>=2.28.0 PyYAML>=6.0 cryptography>=3.4.8
|
|
217
|
+
|
|
218
|
+
# Verify cryptography installation for NCP signatures
|
|
219
|
+
python -c "from cryptography.hazmat.primitives import hashes, hmac; print('NCP crypto support: OK')"
|
|
220
|
+
|
|
221
|
+
# Test YAML parsing for NCP configuration
|
|
222
|
+
python -c "import yaml; print('NCP YAML support: OK')"
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Supported Python Versions
|
|
226
|
+
- **Python 3.9**: Minimum supported version
|
|
227
|
+
- **Python 3.10**: Fully supported
|
|
228
|
+
- **Python 3.11**: Recommended (tested with 3.11.13)
|
|
229
|
+
- **Python 3.12**: Fully supported
|
|
230
|
+
- **Python 3.13+**: Not yet tested (may work but not guaranteed)
|
|
231
|
+
|
|
232
|
+
## ⚙️ Configuration
|
|
233
|
+
|
|
234
|
+
IC CLI uses a modern, secure YAML-based configuration system that separates default settings from sensitive credentials.
|
|
235
|
+
|
|
236
|
+
### Quick Setup
|
|
237
|
+
|
|
238
|
+
The fastest way to get started is using the built-in configuration initializer:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Initialize configuration with guided setup
|
|
242
|
+
ic config init
|
|
243
|
+
|
|
244
|
+
# This creates:
|
|
245
|
+
# - ~/.ic/config/default.yaml (default settings)
|
|
246
|
+
# - ~/.ic/config/secrets.yaml.example (template for secrets)
|
|
247
|
+
# - Updates .gitignore for security
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Configuration Structure
|
|
251
|
+
|
|
252
|
+
IC CLI uses a two-file configuration system for security:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
~/.ic/config/
|
|
256
|
+
├── default.yaml # Non-sensitive default settings
|
|
257
|
+
└── secrets.yaml # Your sensitive credentials (create from example)
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Step-by-Step Configuration
|
|
261
|
+
|
|
262
|
+
#### 1. Initialize Configuration
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Create configuration directory and files
|
|
266
|
+
ic config init
|
|
267
|
+
|
|
268
|
+
# For specific cloud platforms
|
|
269
|
+
ic config init --template aws # AWS-focused setup
|
|
270
|
+
ic config init --template multi-cloud # All platforms
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### 2. Configure Credentials
|
|
274
|
+
|
|
275
|
+
Copy the example secrets file and add your credentials:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Copy the example file
|
|
279
|
+
cp ~/.ic/config/secrets.yaml.example ~/.ic/config/secrets.yaml
|
|
280
|
+
|
|
281
|
+
# Edit with your actual credentials
|
|
282
|
+
vim ~/.ic/config/secrets.yaml
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
#### 3. Example Secrets Configuration
|
|
286
|
+
|
|
287
|
+
```yaml
|
|
288
|
+
# ~/.ic/config/secrets.yaml
|
|
289
|
+
# AWS Configuration
|
|
290
|
+
aws:
|
|
291
|
+
accounts:
|
|
292
|
+
- "123456789012" # Your AWS account IDs
|
|
293
|
+
- "987654321098"
|
|
294
|
+
profiles:
|
|
295
|
+
default: "your-aws-profile-name"
|
|
296
|
+
regions:
|
|
297
|
+
- "ap-northeast-2"
|
|
298
|
+
- "us-east-1"
|
|
299
|
+
|
|
300
|
+
# Oracle Cloud Infrastructure
|
|
301
|
+
oci:
|
|
302
|
+
config_file: "~/.oci/config"
|
|
303
|
+
profile: "DEFAULT"
|
|
304
|
+
compartments:
|
|
305
|
+
- "ocid1.compartment.oc1..example"
|
|
306
|
+
|
|
307
|
+
# CloudFlare Configuration
|
|
308
|
+
cloudflare:
|
|
309
|
+
email: "your-email@example.com"
|
|
310
|
+
api_token: "your-cloudflare-api-token"
|
|
311
|
+
accounts: ["account1", "account2"] # Filter specific accounts
|
|
312
|
+
zones: ["example.com", "test.com"] # Filter specific zones
|
|
313
|
+
|
|
314
|
+
# NCP (Naver Cloud Platform) Configuration
|
|
315
|
+
ncp:
|
|
316
|
+
access_key: "your-ncp-access-key"
|
|
317
|
+
secret_key: "your-ncp-secret-key"
|
|
318
|
+
region: "KR" # KR (Korea), US (United States), JP (Japan)
|
|
319
|
+
platform: "VPC" # VPC (recommended) or Classic
|
|
320
|
+
|
|
321
|
+
# NCP Government Cloud Configuration
|
|
322
|
+
ncpgov:
|
|
323
|
+
access_key: "your-ncpgov-access-key"
|
|
324
|
+
secret_key: "your-ncpgov-secret-key"
|
|
325
|
+
apigw_key: "your-ncpgov-apigw-key" # API Gateway key for government cloud
|
|
326
|
+
region: "KR"
|
|
327
|
+
platform: "VPC"
|
|
328
|
+
security:
|
|
329
|
+
encryption_enabled: true
|
|
330
|
+
audit_logging_enabled: true
|
|
331
|
+
access_control_enabled: true
|
|
332
|
+
mask_sensitive_data: true
|
|
333
|
+
|
|
334
|
+
# SSH Configuration
|
|
335
|
+
ssh:
|
|
336
|
+
key_dir: "~/aws-keys"
|
|
337
|
+
timeout: 30
|
|
338
|
+
skip_prefixes: # Skip servers with these prefixes for security
|
|
339
|
+
- "git"
|
|
340
|
+
- "bastion"
|
|
341
|
+
- "jump"
|
|
342
|
+
- "proxy"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
#### 4. Platform-Specific Setup
|
|
346
|
+
|
|
347
|
+
**AWS Credentials:**
|
|
348
|
+
```bash
|
|
349
|
+
# Configure AWS CLI (if not already done)
|
|
350
|
+
aws configure
|
|
351
|
+
|
|
352
|
+
# Or use specific profiles
|
|
353
|
+
aws configure --profile production
|
|
354
|
+
aws configure --profile development
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**OCI Configuration:**
|
|
358
|
+
```bash
|
|
359
|
+
# Install OCI CLI and configure
|
|
360
|
+
oci setup config
|
|
361
|
+
|
|
362
|
+
# Verify configuration
|
|
363
|
+
oci iam user get --user-id $(oci iam user list --query 'data[0].id' --raw-output)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**NCP Credentials:**
|
|
367
|
+
1. Go to NCP Console → My Page → API Key Management
|
|
368
|
+
2. Create Access Key and Secret Key
|
|
369
|
+
3. Add credentials to secrets.yaml
|
|
370
|
+
4. For NCP Gov: Use separate government cloud credentials
|
|
371
|
+
|
|
372
|
+
**CloudFlare API Token:**
|
|
373
|
+
1. Go to CloudFlare Dashboard → My Profile → API Tokens
|
|
374
|
+
2. Create token with Zone:Read permissions
|
|
375
|
+
3. Add token to secrets.yaml
|
|
376
|
+
|
|
377
|
+
### Configuration Management Commands
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
# Validate configuration
|
|
381
|
+
ic config validate
|
|
382
|
+
|
|
383
|
+
# Show current configuration (sensitive data masked)
|
|
384
|
+
ic config show
|
|
385
|
+
|
|
386
|
+
# Show only AWS configuration
|
|
387
|
+
ic config show --aws
|
|
388
|
+
|
|
389
|
+
# Get specific configuration value
|
|
390
|
+
ic config get aws.regions
|
|
391
|
+
|
|
392
|
+
# Set configuration value
|
|
393
|
+
ic config set aws.regions '["us-east-1", "ap-northeast-2"]'
|
|
394
|
+
|
|
395
|
+
# Migrate from old .env configuration
|
|
396
|
+
ic config migrate
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## 🚀 Usage
|
|
400
|
+
|
|
401
|
+
All IC CLI commands feature rich progress bars that show real-time progress for long-running operations, making it easy to monitor multi-region and multi-account queries.
|
|
402
|
+
|
|
403
|
+
### AWS Services
|
|
404
|
+
|
|
405
|
+
#### Compute Services
|
|
406
|
+
```bash
|
|
407
|
+
# EC2 instances with progress tracking
|
|
408
|
+
ic aws ec2 info
|
|
409
|
+
ic aws ec2 info --account 123456789012 --regions us-east-1,ap-northeast-2
|
|
410
|
+
|
|
411
|
+
# ECS services and tasks
|
|
412
|
+
ic aws ecs info # List all ECS clusters and services
|
|
413
|
+
ic aws ecs service # Detailed service information
|
|
414
|
+
ic aws ecs task # Running task information
|
|
415
|
+
|
|
416
|
+
# EKS clusters and workloads
|
|
417
|
+
ic aws eks info # Cluster information
|
|
418
|
+
ic aws eks nodes # Node group details
|
|
419
|
+
ic aws eks pods # Pod status across clusters
|
|
420
|
+
ic aws eks addons # EKS add-on information
|
|
421
|
+
ic aws eks fargate # Fargate profile details
|
|
422
|
+
|
|
423
|
+
# Fargate services
|
|
424
|
+
ic aws fargate info # Fargate service information
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
#### Storage Services
|
|
428
|
+
```bash
|
|
429
|
+
# S3 buckets with tag management
|
|
430
|
+
ic aws s3 list_tags # List all S3 buckets with tags
|
|
431
|
+
ic aws s3 tag_check # Validate S3 bucket tagging compliance
|
|
432
|
+
ic aws s3 info # Detailed S3 bucket information
|
|
433
|
+
|
|
434
|
+
# RDS databases
|
|
435
|
+
ic aws rds info # RDS instance and cluster information
|
|
436
|
+
ic aws rds list_tags # RDS resource tags
|
|
437
|
+
ic aws rds tag_check # RDS tagging compliance
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
#### Networking Services
|
|
441
|
+
```bash
|
|
442
|
+
# VPC and networking
|
|
443
|
+
ic aws vpc info # VPC, subnet, and gateway information
|
|
444
|
+
ic aws vpc list_tags # VPC resource tags
|
|
445
|
+
ic aws vpc tag_check # VPC tagging compliance
|
|
446
|
+
|
|
447
|
+
# Load Balancers
|
|
448
|
+
ic aws lb info # Load balancer details
|
|
449
|
+
ic aws lb list_tags # Load balancer tags
|
|
450
|
+
ic aws lb tag_check # Load balancer tagging compliance
|
|
451
|
+
|
|
452
|
+
# Security Groups
|
|
453
|
+
ic aws sg info # Security group rules and associations
|
|
454
|
+
|
|
455
|
+
# VPN connections
|
|
456
|
+
ic aws vpn info # VPN gateway and connection information
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
#### Other AWS Services
|
|
460
|
+
```bash
|
|
461
|
+
# CloudFront distributions
|
|
462
|
+
ic aws cloudfront info # CloudFront distribution details
|
|
463
|
+
|
|
464
|
+
# MSK (Managed Streaming for Kafka)
|
|
465
|
+
ic aws msk info # MSK cluster information
|
|
466
|
+
ic aws msk broker # Kafka broker details
|
|
467
|
+
|
|
468
|
+
# CodePipeline
|
|
469
|
+
ic aws codepipeline build # Build pipeline status
|
|
470
|
+
ic aws codepipeline deploy # Deployment pipeline information
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Oracle Cloud Infrastructure (OCI)
|
|
474
|
+
|
|
475
|
+
#### Compute and Containers
|
|
476
|
+
```bash
|
|
477
|
+
# VM instances across compartments
|
|
478
|
+
ic oci vm info # VM instances with detailed information
|
|
479
|
+
ic oci vm info --compartment-name "Production"
|
|
480
|
+
|
|
481
|
+
# Container instances
|
|
482
|
+
ic oci aci info # Container instance details
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
#### Networking
|
|
486
|
+
```bash
|
|
487
|
+
# Virtual Cloud Networks
|
|
488
|
+
ic oci vcn info # VCN, subnet, and routing information
|
|
489
|
+
|
|
490
|
+
# Load Balancers
|
|
491
|
+
ic oci lb info # Load balancer configurations
|
|
492
|
+
|
|
493
|
+
# Network Security Groups
|
|
494
|
+
ic oci nsg info # NSG rules and associations
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
#### Storage and Management
|
|
498
|
+
```bash
|
|
499
|
+
# Block and object storage
|
|
500
|
+
ic oci volume info # Block volume details
|
|
501
|
+
ic oci obj info # Object storage bucket information
|
|
502
|
+
|
|
503
|
+
# Identity and policies
|
|
504
|
+
ic oci policy info # IAM policies and permissions
|
|
505
|
+
ic oci policy search # Search policies by criteria
|
|
506
|
+
|
|
507
|
+
# Cost management
|
|
508
|
+
ic oci cost usage # Usage and cost analysis
|
|
509
|
+
ic oci cost credit # Credit and billing information
|
|
510
|
+
|
|
511
|
+
# Compartment management
|
|
512
|
+
ic oci compartment info # Compartment hierarchy and details
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
### NCP (Naver Cloud Platform) Services
|
|
516
|
+
|
|
517
|
+
NCP services support both **Standard Cloud** and **Government Cloud** environments with comprehensive resource management across compute, storage, networking, database, and security services.
|
|
518
|
+
|
|
519
|
+
#### NCP Standard Cloud Services
|
|
520
|
+
|
|
521
|
+
**Compute Services**
|
|
522
|
+
```bash
|
|
523
|
+
# EC2 instances with detailed information
|
|
524
|
+
ic ncp ec2 info # All NCP EC2 instances
|
|
525
|
+
ic ncp ec2 info --name web-server # Filter by instance name
|
|
526
|
+
ic ncp ec2 info --verbose # Detailed instance information
|
|
527
|
+
ic ncp ec2 info --format json # JSON output format
|
|
528
|
+
ic ncp ec2 info --region KR # Specific region (KR, US, JP)
|
|
529
|
+
|
|
530
|
+
# Examples with filtering
|
|
531
|
+
ic ncp ec2 info --name "prod-*" # Filter by name pattern
|
|
532
|
+
ic ncp ec2 info --status running # Filter by instance status
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**Storage Services**
|
|
536
|
+
```bash
|
|
537
|
+
# S3 object storage buckets
|
|
538
|
+
ic ncp s3 info # All NCP S3 buckets
|
|
539
|
+
ic ncp s3 info --name backup-bucket # Filter by bucket name
|
|
540
|
+
ic ncp s3 info --verbose # Include size and object count
|
|
541
|
+
ic ncp s3 info --format table # Table output format (default)
|
|
542
|
+
|
|
543
|
+
# Examples with detailed information
|
|
544
|
+
ic ncp s3 info --name "backup-*" # Filter backup buckets
|
|
545
|
+
ic ncp s3 info --format json # JSON format for automation
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
**Networking Services**
|
|
549
|
+
```bash
|
|
550
|
+
# VPC networking information
|
|
551
|
+
ic ncp vpc info # All NCP VPCs and subnets
|
|
552
|
+
ic ncp vpc info --name production-vpc # Filter by VPC name
|
|
553
|
+
ic ncp vpc info --verbose # Include subnet and route details
|
|
554
|
+
ic ncp vpc info --format json # JSON output
|
|
555
|
+
|
|
556
|
+
# Note: VPC services are only available on VPC platform
|
|
557
|
+
# Classic platform will show appropriate message
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
**Database Services**
|
|
561
|
+
```bash
|
|
562
|
+
# RDS database instances
|
|
563
|
+
ic ncp rds info # All NCP RDS instances
|
|
564
|
+
ic ncp rds info --name db-server # Filter by database name
|
|
565
|
+
ic ncp rds info --verbose # Include engine and configuration details
|
|
566
|
+
ic ncp rds info --format json # JSON output format
|
|
567
|
+
|
|
568
|
+
# Examples with filtering
|
|
569
|
+
ic ncp rds info --name "prod-db-*" # Filter production databases
|
|
570
|
+
ic ncp rds info --engine mysql # Filter by database engine
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
**Security Services**
|
|
574
|
+
```bash
|
|
575
|
+
# Security Groups (Access Control Groups)
|
|
576
|
+
ic ncp sg info # All security groups
|
|
577
|
+
ic ncp sg info --name web-sg # Filter by security group name
|
|
578
|
+
ic ncp sg info --verbose # Include detailed rules
|
|
579
|
+
ic ncp sg info --format json # JSON output format
|
|
580
|
+
|
|
581
|
+
# Examples with detailed rules
|
|
582
|
+
ic ncp sg info --name "web-*" # Filter web-related security groups
|
|
583
|
+
ic ncp sg info --rules inbound # Show inbound rules only
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
#### NCP Government Cloud Services
|
|
587
|
+
|
|
588
|
+
Government cloud services provide enhanced security, compliance features, and audit logging for sensitive workloads.
|
|
589
|
+
|
|
590
|
+
**Government Cloud Compute**
|
|
591
|
+
```bash
|
|
592
|
+
# Government cloud EC2 instances (enhanced security)
|
|
593
|
+
ic ncpgov ec2 info # All NCP Gov EC2 instances
|
|
594
|
+
ic ncpgov ec2 info --name secure-server # Filter by instance name
|
|
595
|
+
ic ncpgov ec2 info --verbose # Detailed info with compliance status
|
|
596
|
+
ic ncpgov ec2 info --format json # JSON with masked sensitive data
|
|
597
|
+
|
|
598
|
+
# Government cloud specific features
|
|
599
|
+
ic ncpgov ec2 info --compliance-check # Show compliance status
|
|
600
|
+
ic ncpgov ec2 info --audit-trail # Include audit information
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
**Government Cloud Storage**
|
|
604
|
+
```bash
|
|
605
|
+
# Government cloud S3 storage (compliance features)
|
|
606
|
+
ic ncpgov s3 info # All NCP Gov S3 buckets
|
|
607
|
+
ic ncpgov s3 info --name secure-bucket # Filter by bucket name
|
|
608
|
+
ic ncpgov s3 info --format json # JSON output with masked sensitive data
|
|
609
|
+
ic ncpgov s3 info --compliance-report # Include compliance information
|
|
610
|
+
|
|
611
|
+
# Enhanced security features
|
|
612
|
+
ic ncpgov s3 info --encryption-status # Show encryption status
|
|
613
|
+
ic ncpgov s3 info --access-audit # Include access audit logs
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
**Government Cloud Networking**
|
|
617
|
+
```bash
|
|
618
|
+
# Government cloud VPC (policy compliance)
|
|
619
|
+
ic ncpgov vpc info # All NCP Gov VPCs with compliance status
|
|
620
|
+
ic ncpgov vpc info --name gov-network # Filter by VPC name
|
|
621
|
+
ic ncpgov vpc info --security-audit # Include security audit information
|
|
622
|
+
ic ncpgov vpc info --compliance-check # Show compliance validation
|
|
623
|
+
|
|
624
|
+
# Government cloud security features
|
|
625
|
+
ic ncpgov vpc info --policy-validation # Validate against government policies
|
|
626
|
+
ic ncpgov vpc info --access-controls # Show access control settings
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
**Government Cloud Database**
|
|
630
|
+
```bash
|
|
631
|
+
# Government cloud RDS with enhanced security
|
|
632
|
+
ic ncpgov rds info # All NCP Gov RDS instances
|
|
633
|
+
ic ncpgov rds info --name secure-db # Filter by database name
|
|
634
|
+
ic ncpgov rds info --encryption-audit # Show encryption and audit status
|
|
635
|
+
ic ncpgov rds info --compliance-report # Include compliance information
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
**Government Cloud Security**
|
|
639
|
+
```bash
|
|
640
|
+
# Government cloud security groups with enhanced policies
|
|
641
|
+
ic ncpgov sg info # All government cloud security groups
|
|
642
|
+
ic ncpgov sg info --name secure-sg # Filter by security group name
|
|
643
|
+
ic ncpgov sg info --policy-compliance # Show policy compliance status
|
|
644
|
+
ic ncpgov sg info --audit-trail # Include security audit trail
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
#### Platform Differences: Classic vs VPC
|
|
648
|
+
|
|
649
|
+
NCP supports two platform types with different capabilities:
|
|
650
|
+
|
|
651
|
+
**VPC Platform (Recommended)**
|
|
652
|
+
```bash
|
|
653
|
+
# VPC platform supports all modern services
|
|
654
|
+
ic ncp ec2 info --platform vpc # VPC-based EC2 instances
|
|
655
|
+
ic ncp vpc info # VPC networking (VPC platform only)
|
|
656
|
+
ic ncp rds info --platform vpc # VPC-based RDS instances
|
|
657
|
+
ic ncp sg info --platform vpc # VPC security groups
|
|
658
|
+
|
|
659
|
+
# VPC platform features:
|
|
660
|
+
# - Modern networking with VPC and subnets
|
|
661
|
+
# - Enhanced security groups
|
|
662
|
+
# - Load balancers with advanced features
|
|
663
|
+
# - Better integration with other services
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
**Classic Platform (Legacy)**
|
|
667
|
+
```bash
|
|
668
|
+
# Classic platform supports legacy services
|
|
669
|
+
ic ncp ec2 info --platform classic # Classic EC2 instances
|
|
670
|
+
ic ncp s3 info --platform classic # Classic object storage
|
|
671
|
+
ic ncp sg info --platform classic # Classic security groups
|
|
672
|
+
|
|
673
|
+
# Note: VPC services not available on Classic platform
|
|
674
|
+
ic ncp vpc info --platform classic # Will show "VPC not available" message
|
|
675
|
+
|
|
676
|
+
# Classic platform limitations:
|
|
677
|
+
# - Legacy networking model
|
|
678
|
+
# - Limited security group features
|
|
679
|
+
# - Some modern services not available
|
|
680
|
+
# - Migration to VPC recommended
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
#### NCP Configuration Setup
|
|
684
|
+
|
|
685
|
+
**Quick Setup**
|
|
686
|
+
```bash
|
|
687
|
+
# Initialize NCP configuration with guided setup
|
|
688
|
+
ic config init # Interactive setup includes NCP options
|
|
689
|
+
|
|
690
|
+
# The setup process:
|
|
691
|
+
# 1. Select "NCP (Naver Cloud Platform)"
|
|
692
|
+
# 2. Choose "Standard Cloud" or "Government Cloud"
|
|
693
|
+
# 3. Enter Access Key and Secret Key
|
|
694
|
+
# 4. Select region (KR, US, JP)
|
|
695
|
+
# 5. Choose platform (VPC recommended, Classic legacy)
|
|
696
|
+
|
|
697
|
+
# Files created:
|
|
698
|
+
# - ~/.ncp/config (NCP standard cloud credentials)
|
|
699
|
+
# - ~/.ncpgov/config (NCP government cloud credentials)
|
|
700
|
+
# - Proper file permissions (600) for security
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
**Manual Configuration**
|
|
704
|
+
```bash
|
|
705
|
+
# Create NCP standard cloud configuration
|
|
706
|
+
mkdir -p ~/.ncp
|
|
707
|
+
cat > ~/.ncp/config << EOF
|
|
708
|
+
default:
|
|
709
|
+
access_key: "your-ncp-access-key"
|
|
710
|
+
secret_key: "your-ncp-secret-key"
|
|
711
|
+
region: "KR"
|
|
712
|
+
platform: "VPC"
|
|
713
|
+
EOF
|
|
714
|
+
chmod 600 ~/.ncp/config
|
|
715
|
+
|
|
716
|
+
# Create NCP government cloud configuration
|
|
717
|
+
mkdir -p ~/.ncpgov
|
|
718
|
+
cat > ~/.ncpgov/config << EOF
|
|
719
|
+
default:
|
|
720
|
+
access_key: "your-ncpgov-access-key"
|
|
721
|
+
secret_key: "your-ncpgov-secret-key"
|
|
722
|
+
apigw_key: "your-ncpgov-apigw-key"
|
|
723
|
+
region: "KR"
|
|
724
|
+
platform: "VPC"
|
|
725
|
+
security:
|
|
726
|
+
encryption_enabled: true
|
|
727
|
+
audit_logging_enabled: true
|
|
728
|
+
access_control_enabled: true
|
|
729
|
+
mask_sensitive_data: true
|
|
730
|
+
EOF
|
|
731
|
+
chmod 600 ~/.ncpgov/config
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
**Configuration Validation**
|
|
735
|
+
```bash
|
|
736
|
+
# Validate NCP configuration
|
|
737
|
+
ic config validate --ncp # Validate standard cloud config
|
|
738
|
+
ic config validate --ncpgov # Validate government cloud config
|
|
739
|
+
ic config validate # Validate all configurations
|
|
740
|
+
|
|
741
|
+
# Show current configuration (sensitive data masked)
|
|
742
|
+
ic config show --ncp # Show NCP standard cloud config
|
|
743
|
+
ic config show --ncpgov # Show NCP government cloud config
|
|
744
|
+
|
|
745
|
+
# Test connectivity
|
|
746
|
+
ic ncp ec2 info --dry-run # Test NCP API connectivity
|
|
747
|
+
ic ncpgov ec2 info --dry-run # Test NCP Gov API connectivity
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
#### Multi-Region and Multi-Account Examples
|
|
751
|
+
|
|
752
|
+
**Multi-Region Operations**
|
|
753
|
+
```bash
|
|
754
|
+
# Query resources across different regions
|
|
755
|
+
ic ncp ec2 info --region KR # Korea region
|
|
756
|
+
ic ncp ec2 info --region US # United States region
|
|
757
|
+
ic ncp ec2 info --region JP # Japan region
|
|
758
|
+
|
|
759
|
+
# Compare resources across regions
|
|
760
|
+
ic ncp s3 info --region KR --format json > kr_buckets.json
|
|
761
|
+
ic ncp s3 info --region US --format json > us_buckets.json
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
**Multi-Profile Configuration**
|
|
765
|
+
```yaml
|
|
766
|
+
# ~/.ncp/config - Multiple profiles
|
|
767
|
+
production:
|
|
768
|
+
access_key: "prod-access-key"
|
|
769
|
+
secret_key: "prod-secret-key"
|
|
770
|
+
region: "KR"
|
|
771
|
+
platform: "VPC"
|
|
772
|
+
|
|
773
|
+
development:
|
|
774
|
+
access_key: "dev-access-key"
|
|
775
|
+
secret_key: "dev-secret-key"
|
|
776
|
+
region: "KR"
|
|
777
|
+
platform: "VPC"
|
|
778
|
+
|
|
779
|
+
staging:
|
|
780
|
+
access_key: "staging-access-key"
|
|
781
|
+
secret_key: "staging-secret-key"
|
|
782
|
+
region: "US"
|
|
783
|
+
platform: "VPC"
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
```bash
|
|
787
|
+
# Use specific profiles
|
|
788
|
+
ic ncp ec2 info --profile production # Use production profile
|
|
789
|
+
ic ncp ec2 info --profile development # Use development profile
|
|
790
|
+
ic ncp ec2 info --profile staging # Use staging profile
|
|
791
|
+
|
|
792
|
+
# Environment variable method
|
|
793
|
+
export NCP_PROFILE=production
|
|
794
|
+
ic ncp ec2 info # Uses production profile
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
### CloudFlare DNS Management
|
|
798
|
+
|
|
799
|
+
```bash
|
|
800
|
+
# DNS records (automatically filtered by configured accounts/zones)
|
|
801
|
+
ic cf dns info # All DNS records
|
|
802
|
+
ic cf dns info --account prod # Specific account
|
|
803
|
+
ic cf dns info --zone example.com # Specific zone
|
|
804
|
+
|
|
805
|
+
# The command respects your configuration filters for security
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### SSH Server Management
|
|
809
|
+
|
|
810
|
+
```bash
|
|
811
|
+
# Server information with security filtering
|
|
812
|
+
ic ssh info # Information about all registered servers
|
|
813
|
+
|
|
814
|
+
# Auto-discovery (respects skip_prefixes in configuration)
|
|
815
|
+
ic ssh reg # Discover and register new SSH servers
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
### Configuration Management
|
|
819
|
+
|
|
820
|
+
```bash
|
|
821
|
+
# Configuration setup and validation
|
|
822
|
+
ic config init # Initialize configuration
|
|
823
|
+
ic config validate # Validate current configuration
|
|
824
|
+
ic config show # Display current configuration (masked)
|
|
825
|
+
ic config show --aws # Show only AWS configuration
|
|
826
|
+
|
|
827
|
+
# Configuration migration
|
|
828
|
+
ic config migrate # Migrate from .env to YAML configuration
|
|
829
|
+
|
|
830
|
+
# Configuration management
|
|
831
|
+
ic config get aws.regions # Get specific value
|
|
832
|
+
ic config set aws.regions '["us-east-1"]' # Set specific value
|
|
833
|
+
|
|
834
|
+
# NCP configuration management
|
|
835
|
+
ic config get ncp.region # Get NCP region
|
|
836
|
+
ic config set ncp.region "KR" # Set NCP region
|
|
837
|
+
ic config get ncp.platform # Get NCP platform (VPC/Classic)
|
|
838
|
+
ic config set ncp.platform "VPC" # Set NCP platform
|
|
839
|
+
ic config validate --ncp # Validate NCP configuration
|
|
840
|
+
ic config show --ncp # Show NCP configuration (masked)
|
|
841
|
+
|
|
842
|
+
# NCP Government cloud configuration
|
|
843
|
+
ic config get ncpgov.region # Get NCP Gov region
|
|
844
|
+
ic config set ncpgov.region "KR" # Set NCP Gov region
|
|
845
|
+
ic config get ncpgov.security.encryption_enabled # Get security setting
|
|
846
|
+
ic config set ncpgov.security.encryption_enabled true # Enable encryption
|
|
847
|
+
ic config validate --ncpgov # Validate NCP Gov configuration
|
|
848
|
+
ic config show --ncpgov # Show NCP Gov configuration (masked)
|
|
849
|
+
|
|
850
|
+
# Multi-profile management
|
|
851
|
+
ic config get ncp.production.region # Get production profile region
|
|
852
|
+
ic config set ncp.development.platform "Classic" # Set dev platform
|
|
853
|
+
ic config list-profiles --ncp # List all NCP profiles
|
|
854
|
+
ic config list-profiles --ncpgov # List all NCP Gov profiles
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
### Multi-Account and Multi-Region Examples
|
|
858
|
+
|
|
859
|
+
```bash
|
|
860
|
+
# Query multiple AWS accounts and regions
|
|
861
|
+
ic aws ec2 info --account 123456789012,987654321098 --regions us-east-1,ap-northeast-2,eu-west-1
|
|
862
|
+
|
|
863
|
+
# OCI multi-compartment queries
|
|
864
|
+
ic oci vm info --compartment-name "Production,Development,Testing"
|
|
865
|
+
|
|
866
|
+
# All commands show progress bars for long-running operations
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
## 📋 Command Structure
|
|
870
|
+
|
|
871
|
+
IC CLI follows a consistent, intuitive command structure across all platforms:
|
|
872
|
+
|
|
873
|
+
```
|
|
874
|
+
ic <platform> <service> <command> [options]
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### Command Components
|
|
878
|
+
|
|
879
|
+
- **platform**: `aws`, `oci`, `ncp`, `ncpgov`, `cf` (CloudFlare), `ssh`, `config`
|
|
880
|
+
- **service**: `ec2`, `s3`, `ecs`, `eks`, `rds`, `vm`, `lb`, `vpc`, `dns`, etc.
|
|
881
|
+
- **command**: `info`, `list_tags`, `tag_check`, etc.
|
|
882
|
+
- **options**: `--account`, `--regions`, `--compartment-name`, `--name`, `--format`, etc.
|
|
883
|
+
|
|
884
|
+
### Common Options
|
|
885
|
+
|
|
886
|
+
Most commands support these common options:
|
|
887
|
+
|
|
888
|
+
```bash
|
|
889
|
+
# AWS-specific options
|
|
890
|
+
--account ACCOUNT_ID # Target specific AWS account(s)
|
|
891
|
+
--regions REGION_LIST # Target specific AWS region(s)
|
|
892
|
+
--profile PROFILE_NAME # Use specific AWS profile
|
|
893
|
+
|
|
894
|
+
# OCI-specific options
|
|
895
|
+
--compartment-name NAME # Target specific OCI compartment(s)
|
|
896
|
+
--region REGION_NAME # Target specific OCI region
|
|
897
|
+
|
|
898
|
+
# NCP-specific options
|
|
899
|
+
--name NAME_FILTER # Filter resources by name
|
|
900
|
+
--format FORMAT # Output format (table, json)
|
|
901
|
+
--region REGION_NAME # Target specific NCP region (KR, US, JP)
|
|
902
|
+
|
|
903
|
+
# CloudFlare-specific options
|
|
904
|
+
--account ACCOUNT_NAME # Target specific CloudFlare account
|
|
905
|
+
--zone ZONE_NAME # Target specific DNS zone
|
|
906
|
+
|
|
907
|
+
# Output options (available on most commands)
|
|
908
|
+
--output json # JSON output format
|
|
909
|
+
--output table # Table output format (default)
|
|
910
|
+
--verbose # Detailed output
|
|
911
|
+
--quiet # Minimal output
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
## 💡 Advanced Examples
|
|
915
|
+
|
|
916
|
+
### Multi-Cloud Infrastructure Audit
|
|
917
|
+
|
|
918
|
+
```bash
|
|
919
|
+
# AWS infrastructure overview
|
|
920
|
+
ic aws ec2 info --regions us-east-1,ap-northeast-2
|
|
921
|
+
ic aws rds info --account 123456789012
|
|
922
|
+
ic aws s3 tag_check
|
|
923
|
+
|
|
924
|
+
# OCI infrastructure overview
|
|
925
|
+
ic oci vm info --compartment-name "Production"
|
|
926
|
+
ic oci lb info
|
|
927
|
+
ic oci cost usage
|
|
928
|
+
|
|
929
|
+
# NCP infrastructure overview
|
|
930
|
+
ic ncp ec2 info --format json # NCP standard cloud instances
|
|
931
|
+
ic ncp s3 info --verbose # NCP object storage with size info
|
|
932
|
+
ic ncp vpc info # NCP networking information
|
|
933
|
+
ic ncp rds info # NCP database instances
|
|
934
|
+
ic ncp sg info # NCP security groups
|
|
935
|
+
|
|
936
|
+
# NCP Government cloud audit (enhanced security)
|
|
937
|
+
ic ncpgov ec2 info --compliance-check # Government cloud instances with compliance
|
|
938
|
+
ic ncpgov s3 info --encryption-status # Government cloud storage with encryption
|
|
939
|
+
ic ncpgov vpc info --security-audit # Government cloud networking with security audit
|
|
940
|
+
ic ncpgov rds info --compliance-report # Government cloud databases with compliance
|
|
941
|
+
ic ncpgov sg info --policy-compliance # Government cloud security with policy check
|
|
942
|
+
|
|
943
|
+
# Cross-region NCP audit
|
|
944
|
+
ic ncp ec2 info --region KR --format json > ncp_kr_instances.json
|
|
945
|
+
ic ncp ec2 info --region US --format json > ncp_us_instances.json
|
|
946
|
+
ic ncp ec2 info --region JP --format json > ncp_jp_instances.json
|
|
947
|
+
|
|
948
|
+
# CloudFlare DNS audit
|
|
949
|
+
ic cf dns info --zone production-domain.com
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### Security and Compliance Checks
|
|
953
|
+
|
|
954
|
+
```bash
|
|
955
|
+
# AWS tagging compliance
|
|
956
|
+
ic aws ec2 tag_check # Check EC2 instance tagging
|
|
957
|
+
ic aws s3 tag_check # Check S3 bucket tagging
|
|
958
|
+
ic aws rds tag_check # Check RDS tagging
|
|
959
|
+
ic aws lb tag_check # Check Load Balancer tagging
|
|
960
|
+
ic aws vpc tag_check # Check VPC resource tagging
|
|
961
|
+
|
|
962
|
+
# OCI policy and security review
|
|
963
|
+
ic oci policy info # Review IAM policies
|
|
964
|
+
ic oci nsg info # Review network security groups
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
### Cost and Resource Management
|
|
968
|
+
|
|
969
|
+
```bash
|
|
970
|
+
# AWS resource inventory
|
|
971
|
+
ic aws ec2 info --regions all # All EC2 instances across regions
|
|
972
|
+
ic aws rds info --account all # All RDS instances across accounts
|
|
973
|
+
ic aws s3 info # All S3 buckets
|
|
974
|
+
|
|
975
|
+
# OCI cost analysis
|
|
976
|
+
ic oci cost usage # Usage and cost breakdown
|
|
977
|
+
ic oci cost credit # Credit and billing status
|
|
978
|
+
ic oci compartment info # Resource organization
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
### Development Status Examples
|
|
982
|
+
|
|
983
|
+
⚠️ **Note**: Azure and GCP features are in development. While usable, they may contain bugs:
|
|
984
|
+
|
|
985
|
+
```bash
|
|
986
|
+
# Azure (Development - may have issues)
|
|
987
|
+
ic azure --help # Shows development warning
|
|
988
|
+
ic azure vm info # Basic VM information
|
|
989
|
+
ic azure aks info # AKS cluster details
|
|
990
|
+
|
|
991
|
+
# GCP (Development - may have issues)
|
|
992
|
+
ic gcp --help # Shows development warning
|
|
993
|
+
ic gcp compute info # Compute Engine instances
|
|
994
|
+
ic gcp gke info # GKE cluster information
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
## 📚 NCP Platform Guide
|
|
998
|
+
|
|
999
|
+
### Understanding NCP Platforms: Classic vs VPC
|
|
1000
|
+
|
|
1001
|
+
NCP offers two platform types with different capabilities and service availability:
|
|
1002
|
+
|
|
1003
|
+
#### VPC Platform (Recommended)
|
|
1004
|
+
|
|
1005
|
+
The VPC (Virtual Private Cloud) platform is the modern, recommended platform for new deployments:
|
|
1006
|
+
|
|
1007
|
+
**Features:**
|
|
1008
|
+
- Modern networking with VPC and subnets
|
|
1009
|
+
- Enhanced security groups with advanced rules
|
|
1010
|
+
- Load balancers with advanced features
|
|
1011
|
+
- Better integration with other NCP services
|
|
1012
|
+
- Support for all modern NCP services
|
|
1013
|
+
|
|
1014
|
+
**Supported Services:**
|
|
1015
|
+
```bash
|
|
1016
|
+
ic ncp ec2 info --platform vpc # VPC-based EC2 instances
|
|
1017
|
+
ic ncp s3 info --platform vpc # Object storage (available on both platforms)
|
|
1018
|
+
ic ncp vpc info # VPC networking (VPC platform only)
|
|
1019
|
+
ic ncp rds info --platform vpc # VPC-based RDS instances
|
|
1020
|
+
ic ncp sg info --platform vpc # VPC security groups with advanced features
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
**Configuration Example:**
|
|
1024
|
+
```yaml
|
|
1025
|
+
# ~/.ncp/config - VPC Platform
|
|
1026
|
+
default:
|
|
1027
|
+
access_key: "your-access-key"
|
|
1028
|
+
secret_key: "your-secret-key"
|
|
1029
|
+
region: "KR"
|
|
1030
|
+
platform: "VPC" # Modern platform
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
#### Classic Platform (Legacy)
|
|
1034
|
+
|
|
1035
|
+
The Classic platform is the legacy platform maintained for backward compatibility:
|
|
1036
|
+
|
|
1037
|
+
**Features:**
|
|
1038
|
+
- Legacy networking model
|
|
1039
|
+
- Basic security groups
|
|
1040
|
+
- Limited load balancer features
|
|
1041
|
+
- Some modern services not available
|
|
1042
|
+
|
|
1043
|
+
**Supported Services:**
|
|
1044
|
+
```bash
|
|
1045
|
+
ic ncp ec2 info --platform classic # Classic EC2 instances
|
|
1046
|
+
ic ncp s3 info --platform classic # Object storage (available on both platforms)
|
|
1047
|
+
ic ncp vpc info --platform classic # Will show "VPC not available on Classic" message
|
|
1048
|
+
ic ncp rds info --platform classic # Classic RDS instances (limited features)
|
|
1049
|
+
ic ncp sg info --platform classic # Basic security groups
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
**Configuration Example:**
|
|
1053
|
+
```yaml
|
|
1054
|
+
# ~/.ncp/config - Classic Platform
|
|
1055
|
+
default:
|
|
1056
|
+
access_key: "your-access-key"
|
|
1057
|
+
secret_key: "your-secret-key"
|
|
1058
|
+
region: "KR"
|
|
1059
|
+
platform: "Classic" # Legacy platform
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
#### Migration from Classic to VPC
|
|
1063
|
+
|
|
1064
|
+
If you're currently using Classic platform, consider migrating to VPC:
|
|
1065
|
+
|
|
1066
|
+
```bash
|
|
1067
|
+
# Check current platform
|
|
1068
|
+
ic config get ncp.platform
|
|
1069
|
+
|
|
1070
|
+
# Switch to VPC platform
|
|
1071
|
+
ic config set ncp.platform "VPC"
|
|
1072
|
+
|
|
1073
|
+
# Verify VPC services are available
|
|
1074
|
+
ic ncp vpc info # Should now show VPC information
|
|
1075
|
+
|
|
1076
|
+
# Compare resources between platforms
|
|
1077
|
+
ic ncp ec2 info --platform classic --format json > classic_instances.json
|
|
1078
|
+
ic ncp ec2 info --platform vpc --format json > vpc_instances.json
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
**Migration Benefits:**
|
|
1082
|
+
- Access to modern networking features
|
|
1083
|
+
- Enhanced security capabilities
|
|
1084
|
+
- Better performance and reliability
|
|
1085
|
+
- Support for new NCP services
|
|
1086
|
+
- Future-proof infrastructure
|
|
1087
|
+
|
|
1088
|
+
### NCP Government Cloud Security
|
|
1089
|
+
|
|
1090
|
+
NCP Government Cloud provides enhanced security and compliance features:
|
|
1091
|
+
|
|
1092
|
+
#### Security Features
|
|
1093
|
+
|
|
1094
|
+
**Enhanced Authentication:**
|
|
1095
|
+
- API Gateway authentication
|
|
1096
|
+
- Multi-factor authentication support
|
|
1097
|
+
- Enhanced access controls
|
|
1098
|
+
|
|
1099
|
+
**Data Protection:**
|
|
1100
|
+
- Automatic data encryption
|
|
1101
|
+
- Sensitive data masking in logs
|
|
1102
|
+
- Audit trail logging
|
|
1103
|
+
- Compliance reporting
|
|
1104
|
+
|
|
1105
|
+
**Configuration Example:**
|
|
1106
|
+
```yaml
|
|
1107
|
+
# ~/.ncpgov/config - Government Cloud Security
|
|
1108
|
+
default:
|
|
1109
|
+
access_key: "your-gov-access-key"
|
|
1110
|
+
secret_key: "your-gov-secret-key"
|
|
1111
|
+
apigw_key: "your-apigw-key"
|
|
1112
|
+
region: "KR"
|
|
1113
|
+
platform: "VPC"
|
|
1114
|
+
security:
|
|
1115
|
+
encryption_enabled: true # Mandatory for government cloud
|
|
1116
|
+
audit_logging_enabled: true # Required for compliance
|
|
1117
|
+
access_control_enabled: true # Enhanced access controls
|
|
1118
|
+
mask_sensitive_data: true # Protect sensitive information
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
#### Compliance Features
|
|
1122
|
+
|
|
1123
|
+
**Audit and Monitoring:**
|
|
1124
|
+
```bash
|
|
1125
|
+
# Check compliance status
|
|
1126
|
+
ic ncpgov ec2 info --compliance-check
|
|
1127
|
+
ic ncpgov s3 info --encryption-status
|
|
1128
|
+
ic ncpgov vpc info --security-audit
|
|
1129
|
+
|
|
1130
|
+
# Generate compliance reports
|
|
1131
|
+
ic ncpgov rds info --compliance-report
|
|
1132
|
+
ic ncpgov sg info --policy-compliance
|
|
1133
|
+
```
|
|
1134
|
+
|
|
1135
|
+
**Security Validation:**
|
|
1136
|
+
```bash
|
|
1137
|
+
# Validate security settings
|
|
1138
|
+
ic config validate --ncpgov --security
|
|
1139
|
+
|
|
1140
|
+
# Check encryption status
|
|
1141
|
+
ic ncpgov s3 info --encryption-audit
|
|
1142
|
+
|
|
1143
|
+
# Review access controls
|
|
1144
|
+
ic ncpgov vpc info --access-controls
|
|
1145
|
+
```
|
|
1146
|
+
|
|
1147
|
+
## 📋 NCP Best Practices
|
|
1148
|
+
|
|
1149
|
+
### Security Best Practices
|
|
1150
|
+
|
|
1151
|
+
**Configuration Security:**
|
|
1152
|
+
```bash
|
|
1153
|
+
# Always use proper file permissions for configuration files
|
|
1154
|
+
chmod 600 ~/.ncp/config ~/.ncpgov/config
|
|
1155
|
+
|
|
1156
|
+
# Verify permissions are correct
|
|
1157
|
+
ls -la ~/.ncp/config ~/.ncpgov/config
|
|
1158
|
+
# Should show: -rw------- (600 permissions)
|
|
1159
|
+
|
|
1160
|
+
# Never commit configuration files to version control
|
|
1161
|
+
echo "~/.ncp/config" >> .gitignore
|
|
1162
|
+
echo "~/.ncpgov/config" >> .gitignore
|
|
1163
|
+
|
|
1164
|
+
# Use environment variables in CI/CD instead of files
|
|
1165
|
+
export NCP_ACCESS_KEY="${{ secrets.NCP_ACCESS_KEY }}"
|
|
1166
|
+
export NCP_SECRET_KEY="${{ secrets.NCP_SECRET_KEY }}"
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
**API Key Management:**
|
|
1170
|
+
```bash
|
|
1171
|
+
# Rotate API keys regularly
|
|
1172
|
+
# 1. Generate new keys in NCP Console
|
|
1173
|
+
# 2. Update configuration
|
|
1174
|
+
# 3. Test new keys
|
|
1175
|
+
# 4. Revoke old keys
|
|
1176
|
+
|
|
1177
|
+
# Use separate keys for different environments
|
|
1178
|
+
# Production keys should be different from development keys
|
|
1179
|
+
|
|
1180
|
+
# Monitor API key usage in NCP Console
|
|
1181
|
+
# Check for unusual activity or unauthorized access
|
|
1182
|
+
```
|
|
1183
|
+
|
|
1184
|
+
**Government Cloud Security:**
|
|
1185
|
+
```bash
|
|
1186
|
+
# Always enable all security features for government cloud
|
|
1187
|
+
ic config set ncpgov.security.encryption_enabled true
|
|
1188
|
+
ic config set ncpgov.security.audit_logging_enabled true
|
|
1189
|
+
ic config set ncpgov.security.access_control_enabled true
|
|
1190
|
+
ic config set ncpgov.security.mask_sensitive_data true
|
|
1191
|
+
|
|
1192
|
+
# Regularly validate compliance
|
|
1193
|
+
ic ncpgov vpc info --compliance-check
|
|
1194
|
+
ic ncpgov s3 info --encryption-status
|
|
1195
|
+
ic ncpgov ec2 info --compliance-check
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1198
|
+
### Performance Best Practices
|
|
1199
|
+
|
|
1200
|
+
**Efficient Resource Queries:**
|
|
1201
|
+
```bash
|
|
1202
|
+
# Use name filters to reduce data transfer
|
|
1203
|
+
ic ncp ec2 info --name "prod-*" # Filter production instances
|
|
1204
|
+
ic ncp s3 info --name "backup-*" # Filter backup buckets
|
|
1205
|
+
|
|
1206
|
+
# Use appropriate output formats
|
|
1207
|
+
ic ncp ec2 info --format json > instances.json # For automation
|
|
1208
|
+
ic ncp ec2 info --format table # For human reading
|
|
1209
|
+
|
|
1210
|
+
# Limit results for large datasets
|
|
1211
|
+
ic ncp ec2 info --limit 50 # Limit to 50 results
|
|
1212
|
+
ic ncp s3 info --limit 20 # Limit to 20 buckets
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
**Multi-Region Optimization:**
|
|
1216
|
+
```bash
|
|
1217
|
+
# Query specific regions instead of all regions
|
|
1218
|
+
ic ncp ec2 info --region KR # Korea region only
|
|
1219
|
+
ic ncp ec2 info --region US # US region only
|
|
1220
|
+
|
|
1221
|
+
# Use parallel queries for multiple regions (in scripts)
|
|
1222
|
+
ic ncp ec2 info --region KR --format json > kr_instances.json &
|
|
1223
|
+
ic ncp ec2 info --region US --format json > us_instances.json &
|
|
1224
|
+
wait # Wait for both to complete
|
|
1225
|
+
```
|
|
1226
|
+
|
|
1227
|
+
**Caching for Repeated Queries:**
|
|
1228
|
+
```bash
|
|
1229
|
+
# Enable caching for repeated queries
|
|
1230
|
+
export NCP_CACHE_ENABLED=true
|
|
1231
|
+
export NCP_CACHE_TTL=300 # 5 minutes
|
|
1232
|
+
|
|
1233
|
+
# Use cached results for faster subsequent queries
|
|
1234
|
+
ic ncp ec2 info # First call - queries API
|
|
1235
|
+
ic ncp ec2 info # Second call - uses cache (if within TTL)
|
|
1236
|
+
```
|
|
1237
|
+
|
|
1238
|
+
### Automation Best Practices
|
|
1239
|
+
|
|
1240
|
+
**CI/CD Integration:**
|
|
1241
|
+
```yaml
|
|
1242
|
+
# GitHub Actions example
|
|
1243
|
+
name: NCP Infrastructure Check
|
|
1244
|
+
on: [push, pull_request]
|
|
1245
|
+
jobs:
|
|
1246
|
+
ncp-check:
|
|
1247
|
+
runs-on: ubuntu-latest
|
|
1248
|
+
steps:
|
|
1249
|
+
- uses: actions/checkout@v2
|
|
1250
|
+
- name: Setup Python
|
|
1251
|
+
uses: actions/setup-python@v2
|
|
1252
|
+
with:
|
|
1253
|
+
python-version: '3.11'
|
|
1254
|
+
- name: Install IC CLI
|
|
1255
|
+
run: pip install ic-code
|
|
1256
|
+
- name: Check NCP Resources
|
|
1257
|
+
env:
|
|
1258
|
+
NCP_ACCESS_KEY: ${{ secrets.NCP_ACCESS_KEY }}
|
|
1259
|
+
NCP_SECRET_KEY: ${{ secrets.NCP_SECRET_KEY }}
|
|
1260
|
+
run: |
|
|
1261
|
+
ic ncp ec2 info --format json > ncp_instances.json
|
|
1262
|
+
ic ncp s3 info --format json > ncp_buckets.json
|
|
1263
|
+
ic ncp vpc info --format json > ncp_vpcs.json
|
|
1264
|
+
```
|
|
1265
|
+
|
|
1266
|
+
**Scripting Best Practices:**
|
|
1267
|
+
```bash
|
|
1268
|
+
#!/bin/bash
|
|
1269
|
+
# ncp_audit_script.sh - Example audit script
|
|
1270
|
+
|
|
1271
|
+
set -e # Exit on error
|
|
1272
|
+
|
|
1273
|
+
# Set up logging
|
|
1274
|
+
LOG_FILE="ncp_audit_$(date +%Y%m%d_%H%M%S).log"
|
|
1275
|
+
exec 1> >(tee -a "$LOG_FILE")
|
|
1276
|
+
exec 2>&1
|
|
1277
|
+
|
|
1278
|
+
echo "Starting NCP infrastructure audit..."
|
|
1279
|
+
|
|
1280
|
+
# Check configuration
|
|
1281
|
+
if ! ic config validate --ncp; then
|
|
1282
|
+
echo "ERROR: NCP configuration validation failed"
|
|
1283
|
+
exit 1
|
|
1284
|
+
fi
|
|
1285
|
+
|
|
1286
|
+
# Audit all services
|
|
1287
|
+
echo "Auditing EC2 instances..."
|
|
1288
|
+
ic ncp ec2 info --format json > ec2_audit.json
|
|
1289
|
+
|
|
1290
|
+
echo "Auditing S3 buckets..."
|
|
1291
|
+
ic ncp s3 info --format json > s3_audit.json
|
|
1292
|
+
|
|
1293
|
+
echo "Auditing VPC networks..."
|
|
1294
|
+
ic ncp vpc info --format json > vpc_audit.json
|
|
1295
|
+
|
|
1296
|
+
echo "Auditing RDS databases..."
|
|
1297
|
+
ic ncp rds info --format json > rds_audit.json
|
|
1298
|
+
|
|
1299
|
+
echo "Auditing Security Groups..."
|
|
1300
|
+
ic ncp sg info --format json > sg_audit.json
|
|
1301
|
+
|
|
1302
|
+
echo "NCP audit completed successfully"
|
|
1303
|
+
```
|
|
1304
|
+
|
|
1305
|
+
**Error Handling in Scripts:**
|
|
1306
|
+
```bash
|
|
1307
|
+
#!/bin/bash
|
|
1308
|
+
# ncp_with_error_handling.sh
|
|
1309
|
+
|
|
1310
|
+
# Function to handle errors
|
|
1311
|
+
handle_error() {
|
|
1312
|
+
echo "ERROR: $1" >&2
|
|
1313
|
+
exit 1
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
# Test NCP connectivity before proceeding
|
|
1317
|
+
if ! ic ncp ec2 info --dry-run >/dev/null 2>&1; then
|
|
1318
|
+
handle_error "NCP API connectivity test failed"
|
|
1319
|
+
fi
|
|
1320
|
+
|
|
1321
|
+
# Use error handling for each command
|
|
1322
|
+
ic ncp ec2 info --format json > instances.json || handle_error "Failed to get EC2 instances"
|
|
1323
|
+
ic ncp s3 info --format json > buckets.json || handle_error "Failed to get S3 buckets"
|
|
1324
|
+
|
|
1325
|
+
echo "All NCP operations completed successfully"
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
## 🔧 Troubleshooting
|
|
1329
|
+
|
|
1330
|
+
### NCP-Specific Troubleshooting
|
|
1331
|
+
|
|
1332
|
+
For NCP (Naver Cloud Platform) specific issues:
|
|
1333
|
+
- **Installation Guide**: [NCP Installation Guide](docs/ncp_installation_guide.md)
|
|
1334
|
+
- **Troubleshooting**: [NCP Troubleshooting Guide](docs/ncp_troubleshooting_guide.md)
|
|
1335
|
+
|
|
1336
|
+
#### Quick NCP Troubleshooting
|
|
1337
|
+
|
|
1338
|
+
**Configuration Issues:**
|
|
1339
|
+
```bash
|
|
1340
|
+
# Check if NCP configuration exists
|
|
1341
|
+
ls -la ~/.ncp/config ~/.ncpgov/config
|
|
1342
|
+
|
|
1343
|
+
# Validate NCP configuration
|
|
1344
|
+
ic config validate --ncp
|
|
1345
|
+
ic config validate --ncpgov
|
|
1346
|
+
|
|
1347
|
+
# Show current NCP configuration (masked)
|
|
1348
|
+
ic config show --ncp
|
|
1349
|
+
ic config show --ncpgov
|
|
1350
|
+
|
|
1351
|
+
# Test NCP API connectivity
|
|
1352
|
+
ic ncp ec2 info --dry-run
|
|
1353
|
+
ic ncpgov ec2 info --dry-run
|
|
1354
|
+
```
|
|
1355
|
+
|
|
1356
|
+
**Authentication Issues:**
|
|
1357
|
+
```bash
|
|
1358
|
+
# Verify NCP credentials in console
|
|
1359
|
+
# NCP Console → My Page → API Key Management
|
|
1360
|
+
|
|
1361
|
+
# Check file permissions (must be 600)
|
|
1362
|
+
chmod 600 ~/.ncp/config ~/.ncpgov/config
|
|
1363
|
+
|
|
1364
|
+
# Test with environment variables
|
|
1365
|
+
export NCP_ACCESS_KEY="your-key"
|
|
1366
|
+
export NCP_SECRET_KEY="your-secret"
|
|
1367
|
+
ic ncp ec2 info
|
|
1368
|
+
```
|
|
1369
|
+
|
|
1370
|
+
**Platform-Specific Issues:**
|
|
1371
|
+
```bash
|
|
1372
|
+
# Check platform configuration
|
|
1373
|
+
ic config get ncp.platform # Should be "VPC" or "Classic"
|
|
1374
|
+
|
|
1375
|
+
# VPC services not available on Classic platform
|
|
1376
|
+
ic ncp vpc info --platform classic # Will show "not available" message
|
|
1377
|
+
|
|
1378
|
+
# Switch to VPC platform
|
|
1379
|
+
ic config set ncp.platform "VPC"
|
|
1380
|
+
```
|
|
1381
|
+
|
|
1382
|
+
**Government Cloud Issues:**
|
|
1383
|
+
```bash
|
|
1384
|
+
# Verify API Gateway key is configured
|
|
1385
|
+
ic config get ncpgov.apigw_key
|
|
1386
|
+
|
|
1387
|
+
# Check security settings
|
|
1388
|
+
ic config get ncpgov.security.encryption_enabled
|
|
1389
|
+
|
|
1390
|
+
# Enable compliance mode
|
|
1391
|
+
ic config set ncpgov.security.compliance_mode true
|
|
1392
|
+
```
|
|
1393
|
+
|
|
1394
|
+
**Regional Issues:**
|
|
1395
|
+
```bash
|
|
1396
|
+
# Check supported regions
|
|
1397
|
+
ic config get ncp.region # Should be KR, US, or JP
|
|
1398
|
+
|
|
1399
|
+
# Test different regions
|
|
1400
|
+
ic ncp ec2 info --region KR
|
|
1401
|
+
ic ncp ec2 info --region US
|
|
1402
|
+
ic ncp ec2 info --region JP
|
|
1403
|
+
|
|
1404
|
+
# Some services may not be available in all regions
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
### Common Issues and Solutions
|
|
1408
|
+
|
|
1409
|
+
#### Installation Issues
|
|
1410
|
+
|
|
1411
|
+
**Problem**: `pip install ic-code` fails with dependency conflicts
|
|
1412
|
+
```bash
|
|
1413
|
+
# Solution: Use a virtual environment
|
|
1414
|
+
python -m venv ic-env
|
|
1415
|
+
source ic-env/bin/activate # On Windows: ic-env\Scripts\activate
|
|
1416
|
+
pip install --upgrade pip
|
|
1417
|
+
pip install ic-code
|
|
1418
|
+
```
|
|
1419
|
+
|
|
1420
|
+
**Problem**: Python version compatibility issues
|
|
1421
|
+
```bash
|
|
1422
|
+
# Check Python version (3.9+ required, 3.11.13 recommended)
|
|
1423
|
+
python --version
|
|
1424
|
+
|
|
1425
|
+
# Install compatible Python version using pyenv (recommended)
|
|
1426
|
+
pyenv install 3.11.13
|
|
1427
|
+
pyenv local 3.11.13
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
#### Configuration Issues
|
|
1431
|
+
|
|
1432
|
+
**Problem**: `ic config validate` shows validation errors
|
|
1433
|
+
```bash
|
|
1434
|
+
# Check configuration file syntax
|
|
1435
|
+
ic config show --verbose
|
|
1436
|
+
|
|
1437
|
+
# Reinitialize configuration
|
|
1438
|
+
ic config init --force
|
|
1439
|
+
|
|
1440
|
+
# Migrate from old .env configuration
|
|
1441
|
+
ic config migrate
|
|
1442
|
+
```
|
|
1443
|
+
|
|
1444
|
+
**Problem**: AWS credentials not found
|
|
1445
|
+
```bash
|
|
1446
|
+
# Configure AWS CLI
|
|
1447
|
+
aws configure
|
|
1448
|
+
|
|
1449
|
+
# Verify AWS credentials
|
|
1450
|
+
aws sts get-caller-identity
|
|
1451
|
+
|
|
1452
|
+
# Check IC configuration
|
|
1453
|
+
ic config show --aws
|
|
1454
|
+
```
|
|
1455
|
+
|
|
1456
|
+
**Problem**: OCI configuration issues
|
|
1457
|
+
```bash
|
|
1458
|
+
# Verify OCI CLI configuration
|
|
1459
|
+
oci setup config
|
|
1460
|
+
|
|
1461
|
+
# Test OCI connectivity
|
|
1462
|
+
oci iam user get --user-id $(oci iam user list --query 'data[0].id' --raw-output)
|
|
1463
|
+
|
|
1464
|
+
# Check IC OCI configuration
|
|
1465
|
+
ic config get oci.config_file
|
|
1466
|
+
```
|
|
1467
|
+
|
|
1468
|
+
#### Runtime Issues
|
|
1469
|
+
|
|
1470
|
+
**Problem**: Commands hang or timeout
|
|
1471
|
+
```bash
|
|
1472
|
+
# Check network connectivity
|
|
1473
|
+
ping aws.amazon.com
|
|
1474
|
+
ping oracle.com
|
|
1475
|
+
|
|
1476
|
+
# Increase timeout in configuration
|
|
1477
|
+
ic config set aws.timeout 60
|
|
1478
|
+
ic config set oci.timeout 60
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
**Problem**: Permission denied errors
|
|
1482
|
+
```bash
|
|
1483
|
+
# Check file permissions
|
|
1484
|
+
ls -la ~/.ic/config/
|
|
1485
|
+
|
|
1486
|
+
# Fix permissions
|
|
1487
|
+
chmod 600 ~/.ic/config/secrets.yaml
|
|
1488
|
+
chmod 755 ~/.ic/config/
|
|
1489
|
+
```
|
|
1490
|
+
|
|
1491
|
+
**Problem**: Progress bars not displaying correctly
|
|
1492
|
+
```bash
|
|
1493
|
+
# Check terminal compatibility
|
|
1494
|
+
echo $TERM
|
|
1495
|
+
|
|
1496
|
+
# Force simple output if needed
|
|
1497
|
+
export IC_SIMPLE_OUTPUT=1
|
|
1498
|
+
ic aws ec2 info
|
|
1499
|
+
```
|
|
1500
|
+
|
|
1501
|
+
#### Platform-Specific Issues
|
|
1502
|
+
|
|
1503
|
+
**AWS Issues:**
|
|
1504
|
+
- Ensure AWS CLI is configured: `aws configure`
|
|
1505
|
+
- Check account access: `aws sts get-caller-identity`
|
|
1506
|
+
- Verify region availability: `aws ec2 describe-regions`
|
|
1507
|
+
|
|
1508
|
+
**OCI Issues:**
|
|
1509
|
+
- Verify OCI CLI setup: `oci setup config`
|
|
1510
|
+
- Check compartment access: `oci iam compartment list`
|
|
1511
|
+
- Validate API key: `oci iam user get --user-id <user-id>`
|
|
1512
|
+
|
|
1513
|
+
**NCP Issues:**
|
|
1514
|
+
- Ensure NCP dependencies are installed: `pip install ic-code` (includes NCP support)
|
|
1515
|
+
- Check API credentials in NCP Console → My Page → API Key Management
|
|
1516
|
+
- Verify configuration files exist: `~/.ncp/config` and `~/.ncpgov/config`
|
|
1517
|
+
- Check file permissions: `chmod 600 ~/.ncp/config ~/.ncpgov/config`
|
|
1518
|
+
- Validate platform compatibility: VPC platform recommended, Classic is legacy
|
|
1519
|
+
- For government cloud: Ensure API Gateway key is configured
|
|
1520
|
+
- Test connectivity: `ic ncp ec2 info --dry-run` and `ic ncpgov ec2 info --dry-run`
|
|
1521
|
+
- Check region availability: Some services may not be available in all regions
|
|
1522
|
+
- Verify platform-specific services: VPC services not available on Classic platform
|
|
1523
|
+
|
|
1524
|
+
**CloudFlare Issues:**
|
|
1525
|
+
- Verify API token permissions in CloudFlare dashboard
|
|
1526
|
+
- Check zone access: Test with CloudFlare API directly
|
|
1527
|
+
- Ensure account/zone filters are correct in configuration
|
|
1528
|
+
|
|
1529
|
+
### Getting Help
|
|
1530
|
+
|
|
1531
|
+
```bash
|
|
1532
|
+
# General help
|
|
1533
|
+
ic --help
|
|
1534
|
+
|
|
1535
|
+
# Platform-specific help
|
|
1536
|
+
ic aws --help
|
|
1537
|
+
ic oci --help
|
|
1538
|
+
ic cf --help
|
|
1539
|
+
|
|
1540
|
+
# Service-specific help
|
|
1541
|
+
ic aws ec2 --help
|
|
1542
|
+
ic oci vm --help
|
|
1543
|
+
|
|
1544
|
+
# NCP service help
|
|
1545
|
+
ic ncp --help # NCP platform overview
|
|
1546
|
+
ic ncp ec2 --help # NCP EC2 service help
|
|
1547
|
+
ic ncp s3 --help # NCP S3 service help
|
|
1548
|
+
ic ncp vpc --help # NCP VPC service help
|
|
1549
|
+
ic ncp rds --help # NCP RDS service help
|
|
1550
|
+
ic ncp sg --help # NCP Security Group help
|
|
1551
|
+
|
|
1552
|
+
# NCP Government cloud help
|
|
1553
|
+
ic ncpgov --help # NCP Gov platform overview
|
|
1554
|
+
ic ncpgov ec2 --help # NCP Gov EC2 service help
|
|
1555
|
+
ic ncpgov s3 --help # NCP Gov S3 service help
|
|
1556
|
+
ic ncpgov vpc --help # NCP Gov VPC service help
|
|
1557
|
+
ic ncpgov rds --help # NCP Gov RDS service help
|
|
1558
|
+
ic ncpgov sg --help # NCP Gov Security Group help
|
|
1559
|
+
|
|
1560
|
+
# Configuration help
|
|
1561
|
+
ic config --help
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
### Debug Mode
|
|
1565
|
+
|
|
1566
|
+
Enable verbose logging for troubleshooting:
|
|
1567
|
+
|
|
1568
|
+
```bash
|
|
1569
|
+
# Set debug logging level
|
|
1570
|
+
ic config set logging.level DEBUG
|
|
1571
|
+
|
|
1572
|
+
# Run command with verbose output
|
|
1573
|
+
ic aws ec2 info --verbose
|
|
1574
|
+
|
|
1575
|
+
# Check log files
|
|
1576
|
+
tail -f ~/.ic/logs/ic.log
|
|
1577
|
+
```
|
|
1578
|
+
|
|
1579
|
+
## 🚧 Development Status
|
|
1580
|
+
|
|
1581
|
+
### Production Ready Platforms
|
|
1582
|
+
- ✅ **AWS**: Fully tested and production ready
|
|
1583
|
+
- ✅ **OCI**: Fully tested and production ready
|
|
1584
|
+
- ✅ **NCP**: Fully tested and production ready (Standard and Government Cloud)
|
|
1585
|
+
- ✅ **CloudFlare**: Fully tested and production ready
|
|
1586
|
+
- ✅ **SSH**: Fully tested and production ready
|
|
1587
|
+
|
|
1588
|
+
### Development Platforms
|
|
1589
|
+
- ⚠️ **Azure**: In active development
|
|
1590
|
+
- Basic functionality implemented
|
|
1591
|
+
- May contain bugs or incomplete features
|
|
1592
|
+
- Use with caution in production environments
|
|
1593
|
+
- Help shows development status warning: `ic azure --help`
|
|
1594
|
+
|
|
1595
|
+
- ⚠️ **GCP**: In active development
|
|
1596
|
+
- Basic functionality implemented
|
|
1597
|
+
- May contain bugs or incomplete features
|
|
1598
|
+
- Use with caution in production environments
|
|
1599
|
+
- Help shows development status warning: `ic gcp --help`
|
|
1600
|
+
|
|
1601
|
+
### Reporting Issues
|
|
1602
|
+
|
|
1603
|
+
If you encounter issues with development platforms:
|
|
1604
|
+
|
|
1605
|
+
1. Check the help output for known limitations: `ic azure --help` or `ic gcp --help`
|
|
1606
|
+
2. Enable debug logging: `ic config set logging.level DEBUG`
|
|
1607
|
+
3. Report issues with detailed logs on [GitHub Issues](https://github.com/dgr009/ic/issues)
|
|
1608
|
+
4. Include platform, service, and command details in your report
|
|
1609
|
+
|
|
1610
|
+
## 🏗️ Development
|
|
1611
|
+
|
|
1612
|
+
### Project Structure
|
|
1613
|
+
|
|
1614
|
+
```
|
|
1615
|
+
ic/
|
|
1616
|
+
├── src/ic/ # Main package
|
|
1617
|
+
│ ├── cli.py # CLI entry point and argument parsing
|
|
1618
|
+
│ ├── config/ # Configuration management system
|
|
1619
|
+
│ ├── core/ # Core utilities and logging
|
|
1620
|
+
│ └── commands/ # Command implementations
|
|
1621
|
+
├── aws/ # AWS service modules
|
|
1622
|
+
├── oci_module/ # Oracle Cloud Infrastructure modules
|
|
1623
|
+
├── ncp_module/ # NCP (Naver Cloud Platform) modules
|
|
1624
|
+
├── ncpgov_module/ # NCP Government Cloud modules
|
|
1625
|
+
├── ncp/ # NCP legacy modules (compatibility)
|
|
1626
|
+
├── ncpgov/ # NCP Gov legacy modules (compatibility)
|
|
1627
|
+
├── cf/ # CloudFlare modules
|
|
1628
|
+
├── ssh/ # SSH management modules
|
|
1629
|
+
├── azure_module/ # Azure modules (development)
|
|
1630
|
+
├── gcp/ # Google Cloud Platform modules (development)
|
|
1631
|
+
├── common/ # Shared utilities and progress decorators
|
|
1632
|
+
├── tests/ # Test suite
|
|
1633
|
+
│ ├── unit/ # Unit tests
|
|
1634
|
+
│ ├── integration/ # Integration tests
|
|
1635
|
+
│ └── security/ # Security tests
|
|
1636
|
+
├── docs/ # Documentation
|
|
1637
|
+
├── requirements.txt # Python dependencies
|
|
1638
|
+
└── pyproject.toml # Package configuration
|
|
1639
|
+
```
|
|
1640
|
+
|
|
1641
|
+
### Setting Up Development Environment
|
|
1642
|
+
|
|
1643
|
+
```bash
|
|
1644
|
+
# Clone repository
|
|
1645
|
+
git clone https://github.com/dgr009/ic.git
|
|
1646
|
+
cd ic
|
|
1647
|
+
|
|
1648
|
+
# Create virtual environment
|
|
1649
|
+
python -m venv ic-dev
|
|
1650
|
+
source ic-dev/bin/activate # On Windows: ic-dev\Scripts\activate
|
|
1651
|
+
|
|
1652
|
+
# Install development dependencies
|
|
1653
|
+
pip install -r requirements.txt
|
|
1654
|
+
pip install -e .[dev]
|
|
1655
|
+
|
|
1656
|
+
# Run tests
|
|
1657
|
+
pytest
|
|
1658
|
+
|
|
1659
|
+
# Run with coverage
|
|
1660
|
+
pytest --cov=src --cov-report=html
|
|
1661
|
+
```
|
|
1662
|
+
|
|
1663
|
+
### Adding New Services
|
|
1664
|
+
|
|
1665
|
+
1. **Create service module**: Add new module in appropriate platform directory
|
|
1666
|
+
2. **Implement progress decorators**: Use `@progress_bar_decorator` for long operations
|
|
1667
|
+
3. **Add CLI integration**: Update `src/ic/cli.py` with new commands
|
|
1668
|
+
4. **Add tests**: Create unit and integration tests
|
|
1669
|
+
5. **Update documentation**: Add usage examples to README
|
|
1670
|
+
|
|
1671
|
+
### Testing
|
|
1672
|
+
|
|
1673
|
+
```bash
|
|
1674
|
+
# Run all tests
|
|
1675
|
+
pytest
|
|
1676
|
+
|
|
1677
|
+
# Run specific test categories
|
|
1678
|
+
pytest -m unit # Unit tests only
|
|
1679
|
+
pytest -m integration # Integration tests only
|
|
1680
|
+
pytest -m security # Security tests only
|
|
1681
|
+
pytest -m ncp # NCP-specific tests only
|
|
1682
|
+
pytest -m ncpgov # NCP Government cloud tests only
|
|
1683
|
+
|
|
1684
|
+
# Run with coverage
|
|
1685
|
+
pytest --cov=src --cov-report=html --cov-report=term
|
|
1686
|
+
|
|
1687
|
+
# Run performance tests
|
|
1688
|
+
pytest -m performance
|
|
1689
|
+
```
|
|
1690
|
+
|
|
1691
|
+
## 🤝 Contributing
|
|
1692
|
+
|
|
1693
|
+
We welcome contributions! Please see our contribution guidelines:
|
|
1694
|
+
|
|
1695
|
+
1. **Fork the repository** on GitHub
|
|
1696
|
+
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
|
|
1697
|
+
3. **Make your changes** with appropriate tests
|
|
1698
|
+
4. **Run the test suite**: `pytest`
|
|
1699
|
+
5. **Update documentation** as needed
|
|
1700
|
+
6. **Submit a pull request** with a clear description
|
|
1701
|
+
|
|
1702
|
+
### Code Standards
|
|
1703
|
+
|
|
1704
|
+
- Follow PEP 8 style guidelines
|
|
1705
|
+
- Add type hints for new functions
|
|
1706
|
+
- Include docstrings for public methods
|
|
1707
|
+
- Add progress bar decorators for long-running operations
|
|
1708
|
+
- Ensure security best practices for credential handling
|
|
1709
|
+
|
|
1710
|
+
## 📄 License
|
|
1711
|
+
|
|
1712
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
1713
|
+
|
|
1714
|
+
## 🆘 Support
|
|
1715
|
+
|
|
1716
|
+
- **Documentation**: This README and inline help (`ic --help`)
|
|
1717
|
+
- **Issues**: [GitHub Issues](https://github.com/dgr009/ic/issues)
|
|
1718
|
+
- **Discussions**: [GitHub Discussions](https://github.com/dgr009/ic/discussions)
|
|
1719
|
+
- **Security**: Report security issues privately via GitHub Security Advisories
|
|
1720
|
+
|
|
1721
|
+
---
|
|
1722
|
+
|
|
1723
|
+
**Made with ❤️ for infrastructure engineers and cloud administrators**$`
|
|
1724
|
+
|