Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Upgrade Strategy for OpenIM #1496

Closed
cubxxw opened this issue Nov 29, 2023 — with Slack · 2 comments · Fixed by #1520 or #1523
Closed

Enhanced Upgrade Strategy for OpenIM #1496

cubxxw opened this issue Nov 29, 2023 — with Slack · 2 comments · Fixed by #1520 or #1523
Assignees
Labels
feature Categorizes issue or PR as related to a new feature. RFC Project design proposal
Milestone

Comments

Copy link
Contributor

cubxxw commented Nov 29, 2023

Abstract

This RFC proposes a comprehensive upgrade strategy for OpenIM, addressing challenges encountered in both minor and major version transitions, environment variable persistence, seamless cluster deployments, and consistency in script and configuration management.

Challenges

  1. Minor Version Changes (e.g., v3.3 to v3.4): Involving script and configuration file modifications.
  2. Major Version Changes (e.g., v3.4 to v3.5): Significant shifts like transitioning from MySQL to MongoDB.
  3. Environment Variable Persistence: Ensuring environment settings are retained across updates.
  4. Cluster Deployment Awareness: Achieving seamless upgrades in a clustered environment.
  5. Source Code Script Deployment: Addressing the synchronization between scripts and configuration files.
  6. Inconsistency in DATA_DIR: Aligning DATA_DIR across various middleware data and configuration storage paths.

Proposed Solutions

Docker Compose Improvements

  • Component Separation and Environment Variables: Use -f to separate component configurations. Sensitive information like passwords should be passed via environment variables, not configuration files. Shared variables across components should also leverage environment variables.
  • In-image Configuration Scripts: Integrate configuration files and scripts within Docker images to streamline management.
  • Config File Mapping and Versioning: Allow external modification of mapped config files. Introduce version control in config files to ensure compatibility with the program version.
  • Template Utilization: Employ env.example and config.example as templates for user guidance.

Linux Deployment and Upgrade

  • Automated Configuration Generation: Utilize make init to generate config.yaml and .env files, offering prompts to overwrite existing files.
  • Priority to Environment Variables: Program to prioritize reading shared variables from environment settings.
  • Upgrade Workflow: Implement git pull for updates, followed by make update. This process will involve comparing and merging .env.sample and config.yaml.sample with existing files, culminating in new .env and config.yaml files. Restart services using docker-compose up -d.

Docker Compose Strategy Enhancement

  • Default Parameter Options: Provide default options in Docker Compose configurations for a simplified setup.
  • Documentation Enhancement: Improve documentation, particularly for environment variables, ensuring clear guidance on configuration options.
  • Selective Overwriting: Offer selective overwriting in make init to prevent accidental configuration loss.

Docker Compose Commands Clarification

  • docker-compose down: Explained as a command to stop and remove all services, containers, networks, and optionally volumes.
  • docker-compose stop: Described as a way to halt services while retaining containers, networks, and volumes for future restarts.

OpenIM Docker Repository Maintenance

  • Structured Directory: Implement a structured directory approach with branch management for different environments or versions.

Data Migration and Backup

  • Emphasize the importance of data migration and backup, especially during major version upgrades, utilizing the DATA_DIR from .env files.

Expanded Thoughts and Further Suggestions

  • Version Compatibility Checks: Introduce a system to automatically check and validate version compatibility during upgrades, reducing manual oversight.
  • Automated Data Migration Tools: Develop or integrate tools for automated data migration, especially when transitioning between database types (e.g., MySQL to MongoDB).
  • Enhanced Cluster Upgrade Support: Research and implement strategies for more seamless upgrades in clustered environments, possibly leveraging advanced orchestration tools.
  • Robust Testing Framework: Establish a robust testing framework to simulate and test upgrades in various environments, ensuring reliability and minimizing disruptions.
  • Community Feedback Loop: Create a community feedback mechanism to gather insights and experiences from users, helping to refine and improve the upgrade process continually.

Conclusion

This RFC aims to foster a more efficient, reliable, and user-friendly upgrade experience for OpenIM users, addressing existing challenges and anticipating future needs.

@cubxxw cubxxw added feature Categorizes issue or PR as related to a new feature. RFC Project design proposal labels Nov 29, 2023 — with Slack
@cubxxw cubxxw added this to the v3.5 milestone Nov 29, 2023 — with Slack
@cubxxw cubxxw self-assigned this Nov 29, 2023
@Bmixo
Copy link

Bmixo commented Nov 29, 2023

I think you are right, the best is passing everything through environment variables and configmap. i test this project recently,i think this project is experimental,these are lots of docker image project in GitHub like Rancher,Mysql, Postgresql, none of these projects require to exec shell file to install and prepare the configure file. And most of project there will provide a web interface for user to steup rather than just import sql and tell user nothing and create several admin user account,i know this is a open-source project,i don't want to have so many expectations for you guys.But when i search so open-source IM information on google, i see a lot of Ads about this project. But just ask i mentioned, i don't know how the project it is well for handling many user chat connections, but as i can see,it is not a good quality at present.I really think you guy have to hire a project manager and a quality manager rather than finish everything through the developers,yes it work, but it didn't have any user experience.

@cubxxw
Copy link
Contributor Author

cubxxw commented Nov 30, 2023

@Bmixo Thank you very much for your interest in our project and for providing valuable feedback. As an open-source project, we do not have the resources to hire project managers, so we rely on the community to discuss and optimize our designs. We believe that providing a web page is crucial, and we already have a management interface called the "Admin Panel". If you are interested in our project, we sincerely invite you to join our Slack channel and discuss the design with us: https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Categorizes issue or PR as related to a new feature. RFC Project design proposal
Projects
Status: Done
2 participants