当前位置:

首页 > 编程开发 > Java如何与Ansible自动化运维平台对接?

Java如何与Ansible自动化运维平台对接?

本文目录

    Java对接ansible自动运维化平台实现文件采集分发此次对接主要为以下两个功能:文件采集(对文件进行批量操作,包括批量从多台主机中采集共性文件如日志文件)文件分发(对文件进行批量操作,包括批量从多台主机中分发共性文件如日志文件)场景说明及ansibleyum安装因ansible没有Windows的安装包,所以为了方便测试,搭建了一套Linux环境进行后续工作。此次采用yum方式安装,在采用yum方式安装Ansible,首先安装EPEL源。yuminstall-yhttp://dl.fedoraproj

    Java对接ansible自动运维化平台实现文件采集分发

    此次对接主要为以下两个功能:

    • 文件采集(对文件进行批量操作,包括批量从多台主机中采集共性文件如日志文件)

    • 文件分发(对文件进行批量操作,包括批量从多台主机中分发共性文件如日志文件)

    场景说明及ansible yum安装

    因ansible没有Windows的安装包,所以为了方便测试,搭建了一套Linux环境进行后续工作。

    此次采用yum方式安装,在采用yum方式安装Ansible,首先安装EPEL源。

    yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    查看EPEL源中的Ansible版本

    yum info ansible

    直接安装此版本,如果有其他要求,请调整源,安装其他ansible版本

    yum install -y ansible

    安装完成之后,查看ansible版本信息

    ansible --version

    配置Ansible服务器清单

    清单文件/etc/ansible/hosts,在此文件中编写节点主机的对应IP地址和端口

    Java如何与Ansible自动化运维平台对接?

    我这里只是做一个演示,其中IP后面可以添加节点真实的SSH的端口,在定义的内容上面有一个[]列表,里面的内容为自定义内容,方面为了操作绑定的节点主机,我习惯称之为分组列表

    简单的认证一下,Ping一下添加的主机

    Java如何与Ansible自动化运维平台对接?

    成功安装ansible !!

    Java代码实现文件分发

    顾名思义,文件分发就是把本机的文件分发到多个主机。

    这时候就需要 Apache POI(大家可以去导入对应的包)来创建本机的文件了(ansible Host配置文件也通过POI创建)

    POI创建文件工具类

    package com.tiduyun.cmp.operation.utils;
    
    import com.tiduyun.cmp.common.model.operation.HostInfo;
    import lombok.extern.slf4j.Slf4j;
    import org.apache.commons.lang.StringUtils;
    import org.springframework.stereotype.Component;
    
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    
    /**
     * @author huyuan@tiduyun.com ansible创建文件
     */
    @Slf4j
    @Component
    public class AnsibleCreateFileUtils {
        private final static String filename = "hosts";
    
        public static String passWordConnect(List hostInfo, String hostGroup , String directory) throws IOException{
            /** 在本地新建一个文件夹 里面创建一个文件 向里面写入内容 */
    
    
            // 创建文件夹对象 创建文件对象
            File folder = new File(directory);
            // 如果文件夹不存在 就创建一个空的文件夹
            if (!folder.exists()) {
                log.info("创建了文件夹{}" , folder);
                folder.mkdirs();
            }
            File file = new File(directory, filename);
            // 如果文件不存在 就创建一个空的文件
            if (!file.exists()) {
                try {
                    log.info("创建了文件{}" , file);
                    file.createNewFile();
                } catch (IOException e) {
                    log.error("error data{}" , e);
                }
            }
            // 写入数据
            // 创建文件字节输出流
            FileOutputStream fos = new FileOutputStream(file);
            try {
                List list = new ArrayList<>();
                for (HostInfo data : hostInfo) {
                    // 开始写
                    String string = data.getHost() + " ansible_ssh_pass=" + data.getPasswd() + " ansible_ssh_user="
                        + data.getAccount() + " ansible_ssh_port=" + data.getPort();
                    list.add(string);
                }
                String splicingData = StringUtils.join(list, "\n");
                String str = "[" + hostGroup + "]" + "\n" + splicingData;
                byte[] bytes = str.getBytes();
                // 将byte数组中的所有数据全部写入
                fos.write(bytes);
                fos.flush();
                log.info("文件内容{}" , str);
                // 删除文件
                // deleteFile(file);
                // 关闭流
    
            } catch (IOException e) {
                log.error("error data{}" , e);
                throw e;
            }finally {
                if (fos != null) {
                    fos.close();
                }
            }
            return directory;
        }
    
        public static void deleteFile(File file) {
            if (file.exists()) {// 判断路径是否存在
                if (file.isFile()) {// boolean isFile():测试此抽象路径名表示的文件是否是一个标准文件。
                    file.delete();
                } else {// 不是文件,对于文件夹的操作
                        // 保存 路径D:/1/新建文件夹2 下的所有的文件和文件夹到listFiles数组中
                    File[] listFiles = file.listFiles();// listFiles方法:返回file路径下所有文件和文件夹的绝对路径
                    for (File file2 : listFiles) {
                        /*
                         * 递归作用:由外到内先一层一层删除里面的文件 再从最内层 反过来删除文件夹
                         *    注意:此时的文件夹在上一步的操作之后,里面的文件内容已全部删除
                         *         所以每一层的文件夹都是空的  ==》最后就可以直接删除了
                         */
                        deleteFile(file2);
                    }
                }
                file.delete();
            } else {
                log.error("该file路径不存在!!");
            }
    
        }
    }

    创建主机组配置文件

    注:ansible分为两种连接方式,这里采用的是密钥连接,生成的文件已拼接密钥!!!后续的采集与分发都要用到这个。(如有不懂的小伙伴,可以去查找一下ansible的连接方式)

        @Override
        public void ansibleCreateHost(HostInfo hostInfo, String Key) {
            ParamCheckUtils.notNull(hostInfo, "hostInfo");
    
            List HostIp = Arrays.asList(hostInfo);
            for (HostInfo data : HostIp) {
                String ansiblePassWd = data.getPasswd();
                String PassWd = hostInfoService.decode(ansiblePassWd);
                data.setPasswd(PassWd);
            }
            try {
                AnsibleCreateFileUtils.passWordConnect(HostIp, ansibleConfigurationItemVo.getHostGroup(),
                    ansibleConfigurationItemVo.getDirectory());
            } catch (IOException e) {
                log.error("Failed to create host configuration{}", e);
            }
        }

    实现文件分发

    主机配置文件已经配置好,接下来就是执行ansible对应的命令,通过Java拼接ansible命令。

    执行命令工具类


    package com.tiduyun.cmp.operation.utils;
    
    import lombok.extern.slf4j.Slf4j;
    
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.nio.charset.Charset;
    
    import static cn.hutool.db.DbUtil.close;
    
    /**
     * @author huyuan@tiduyun.com ansible执行命令工具类
     * upload 上传文件
     * createRemoteDirectory  创建远程目录
     */
    @Slf4j
    public class AnsibleExecuteTheOrderUtils {
    
        private final static String commandBin = "/bin/sh";
    
        private final static String commandC = "-c";
    
    
        /**
         *  创建远程目录
         */
        public static void createRemoteDirectory(String hostGroup, String remotePath, String directory) throws IOException {
            Runtime run = Runtime.getRuntime();
            String[] cmds = new String[3];
            cmds[0] = commandBin;
            cmds[1] = commandC;
            cmds[2] =
                    "ansible " + hostGroup + " -m command -a " + "\"mkdir " + remotePath + "\"" + " -i " + directory + "/hosts";
    
            // 执行CMD命令
            Process p = run.exec(cmds);
            log.info("ansible远程执行命令为{}", cmds[2]);
    
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream(), Charset.forName("UTF-8")));
            try {
                String lineMes;
                while ((lineMes = br.readLine()) != null)
                    log.info(lineMes);// 打印输出信息
                try {
                    // 检查命令是否执行失败。
                    if (p.waitFor() != 0) {
                        if (p.exitValue() == 1)// 0表示正常结束,1:非正常结束
                            log.error("命令执行失败");
                    }
                } catch (InterruptedException e) {
                    log.error("error data{}", e);
                }
            } catch (IOException e) {
                log.error("fail to carry out command{}", e);
                throw e;
            } finally {
                if (br != null) {
                    br.close();
                }
            }
    
        }
    
        /**
         *  文件分发
         */
        public static void upload(String hostGroup, String localPath, String remotePath, String directory)
            throws IOException {
            Runtime run = Runtime.getRuntime();
            String[] cmds = new String[3];
            cmds[0] = commandBin;
            cmds[1] = commandC;
            cmds[2] = "ansible " + hostGroup + " -m copy -a " + "\"src=" + localPath + " dest=" + remotePath + "\"" + " -i "
                + directory + "/hosts";
            // 执行CMD命令
            Process p = run.exec(cmds);
            log.info("ansible命令为{}", cmds[2]);
    
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream(), Charset.forName("UTF-8")));
            try {
                String lineMes;
                while ((lineMes = br.readLine()) != null)
                    log.info("ansible输出信息为 :" + lineMes);// 打印输出信息
                try {
                    // 检查命令是否执行失败。
                    if (p.waitFor() != 0) {
                        if (p.exitValue() == 1)// 0表示正常结束,1:非正常结束
                            log.error("命令执行失败");
                    }
                } catch (InterruptedException e) {
                    log.error("error data{}", e);
                }
            } catch (IOException e) {
                log.error("fail to carry out command{}", e);
                throw e;
            } finally {
                if (br != null) {
                    br.close();
                }
            }
    
        }
    
        /**
         *  文件采集
         */
        public static void fileCollection(String hostGroup, String remotePath, String localPath , String directory) throws IOException {
            Runtime run = Runtime.getRuntime();
            String[] cmds = new String[3];
            cmds[0] = commandBin;
            cmds[1] = commandC;
            cmds[2] = "ansible " + hostGroup + " -m fetch -a " + "\"src=" + remotePath + " dest=" + localPath + " force=yes backup=yes\"" + " -i "
                    + directory + "/hosts";
    
            // 执行CMD命令
            Process p = run.exec(cmds);
            log.info("ansible远程采集文件命令为{}", cmds[2]);
    
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream(), Charset.forName("UTF-8")));
            try {
                String lineMes;
                while ((lineMes = br.readLine()) != null)
                    log.info(lineMes);// 打印输出信息
                try {
                    // 检查命令是否执行失败。
                    if (p.waitFor() != 0) {
                        if (p.exitValue() == 1)// 0表示正常结束,1:非正常结束
                            log.error("命令执行失败");
                    }
                } catch (InterruptedException e) {
                    log.error("error data{}", e);
                }
            } catch (IOException e) {
                log.error("fail to carry out command{}", e);
                throw e;
            } finally {
                if (br != null) {
                    br.close();
                }
            }
    
        }
    
        public static void ExecuteTheOrder(String command) throws IOException {
            log.info("start execute cmd {}", command);
    
            String[] cmd = new String[] {"/bin/bash", "-c", command};
            Runtime run = Runtime.getRuntime();
            Process p = run.exec(cmd); // 执行CMD命令
    
            BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream(), Charset.forName("UTF-8")));
            try {
                String lineMes;
                while ((lineMes = br.readLine()) != null)
                    log.info("输出信息为 {}", lineMes);// 打印输出信息
                try {
                    // 检查命令是否执行失败。
                    if (p.waitFor() != 0) {
                        if (p.exitValue() == 1)// 0表示正常结束,1:非正常结束
                            log.error("命令执行失败");
                    }
                } catch (InterruptedException e) {
                    log.error("error data{}", e);
                }
    
            } catch (IOException e) {
                log.error("fail to carry out command{}", e);
                throw e;
            } finally {
                if (br != null) {
                    br.close();
                }
            }
        }
    
        public static void disconnect() {
            try {
                close();
            } catch (Exception ex) {
                // Ignore because disconnection is quietly
            }
        }
    
        // public void execute(String command) throws Exception {
        // log.info("start execute cmd {}", command);
        // try (Session session = sshClient.startSession()) {
        // Session.Command exec = session.exec(command);
        //
        // Integer readLineCount = 0;
        // InputStream in = exec.getInputStream();
        // log.info(IOUtils.readFully(in).toString());
        // String errorMessage = IOUtils.readFully(exec.getErrorStream(), LoggerFactory.DEFAULT).toString();
        // log.info(errorMessage);
        // if (exec.getExitStatus() != null && exec.getExitStatus() != 0) {
        // throw new RuntimeException(
        // "exec " + command + " error,error message is " + errorMessage + ",error code " + exec.getExitStatus());
        // }
        // log.info("exec result code {}", exec.getExitStatus());
        //
        // }
        //
        // }
    }

    接下来就是调用

    package com.tiduyun.cmp.operation.service.impl;
    
    import cn.hutool.core.util.RandomUtil;
    import cn.hutool.core.util.StrUtil;
    import com.tiduyun.cmp.common.model.flow.UploadFile;
    import com.tiduyun.cmp.common.model.operation.ComponentInfo;
    import com.tiduyun.cmp.common.model.operation.HostInfo;
    import com.tiduyun.cmp.common.provider.service.ExceptionBuildService;
    import com.tiduyun.cmp.operation.constant.OperationExceptionCode;
    import com.tiduyun.cmp.operation.constant.StartCmdSeparate;
    import com.tiduyun.cmp.operation.model.AnsibleConfigurationItemVo;
    import com.tiduyun.cmp.operation.model.vo.FileQueryVo;
    import com.tiduyun.cmp.operation.service.AnsibleTaskRecordService;
    import com.tiduyun.cmp.operation.service.ComposerDeployService;
    import com.tiduyun.cmp.operation.service.HostInfoService;
    import com.tiduyun.cmp.operation.service.UploadFileService;
    import com.tiduyun.cmp.operation.utils.AnsibleExecuteTheOrderUtils;
    import lombok.extern.slf4j.Slf4j;
    import org.apache.commons.collections4.CollectionUtils;
    import org.apache.commons.lang3.StringUtils;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.beans.factory.annotation.Value;
    import org.springframework.stereotype.Service;
    
    import java.io.File;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.List;
    
    @Slf4j
    @Service
    public class AnsibleDeployServiceImpl implements ComposerDeployService {
    
        @Value(value = "${cmp.operation.commandHeader:cmd /c}")
        private String commandHeader;
    
        @Value(value = "${cmp.operation.filePath:/data/cmp/file}")
        private String filePath;
    
        @Value(value = "${cmp.operation.remoteFilePath:/tmp}")
        private String remoteFilePath;
    
        @Autowired
        private AnsibleTaskRecordService ansibleTaskRecordService;
    
        @Autowired
        private AnsibleConfigurationItemVo ansibleConfigurationItemVo;
    
        @Autowired
        private UploadFileService uploadFileService;
    
        @Autowired
        private HostInfoService hostInfoService;
    
        @Autowired
        private ExceptionBuildService exceptionBuildService;
    
        @Override
        public void deploy(HostInfo hostInfo, ComponentInfo componentInfo, String cpmposerName) {
            ansibleTaskRecordService.ansibleCreateHost(hostInfo, null);
    
            try {
                String remotePath = StringUtils.join(remoteFilePath, "/", cpmposerName, "-", componentInfo.getName(), "-",
                    RandomUtil.randomString(3));
                log.info("remote file path = {}", remotePath);
    
                List fileIds = getFileIds(componentInfo.getFileUrl());
                if (CollectionUtils.isNotEmpty(fileIds)) {
                    FileQueryVo uploadFileQueryVo = new FileQueryVo();
                    uploadFileQueryVo.setIds(fileIds);
                    List uploadFiles = uploadFileService.query(uploadFileQueryVo);
                    for (UploadFile uploadFile : uploadFiles) {
                        String path = StringUtils.join(filePath, uploadFile.getFilePath());
                        File file = new File(path);
                        if (!file.exists()) {
                            log.error("file url is {}", file.getPath());
                            throw exceptionBuildService.buildException(OperationExceptionCode.FILE_NOT_EXIST,
                                new Object[] {uploadFile.getFileName()});
                        }
                        // 创建远程目录
                        AnsibleExecuteTheOrderUtils.createRemoteDirectory(ansibleConfigurationItemVo.getHostGroup(),
                            StringUtils.join(remotePath), ansibleConfigurationItemVo.getDirectory());
    
                        // 分发文件
                        AnsibleExecuteTheOrderUtils.upload(ansibleConfigurationItemVo.getHostGroup(), path,
                            StringUtils.join(remotePath, "/", uploadFile.getFileName()),
                            ansibleConfigurationItemVo.getDirectory());
                    }
                }
                List startCmds = getStartCmds(componentInfo.getStartCmd());
                if (CollectionUtils.isNotEmpty(startCmds)) {
                    String cdCmd = StringUtils.join("cd ", remotePath);
                    String execCmd = StringUtils.join(startCmds, ";");
                    execCmd = StringUtils.join(cdCmd, ";", execCmd);
                    log.info("execCmd= " + execCmd);
                    // sshClient.execute(execCmd);
                    AnsibleExecuteTheOrderUtils.ExecuteTheOrder(execCmd);
    
                } else {
                    log.error("parse startCmd fail {}", componentInfo.getStartCmd());
                }
    
            } catch (Exception e) {
                log.error("主机[{}]部署[{}]组件失败,主机ID[{}],组件ID[{}]:", hostInfo.getHost(), componentInfo.getName(),
                    hostInfo.getId(), componentInfo.getId(), e);
                throw exceptionBuildService.buildException(OperationExceptionCode.EXECUTE_CMD_ERROR,
                    new Object[] {e.getMessage()});
    
            } finally {
                AnsibleExecuteTheOrderUtils.disconnect();
            }
    
        }
    
        @Override
        public boolean isSupport(HostInfo hostInfo) {
            return true;
        }
    
        private List getFileIds(String fileIds) {
            List ids = new ArrayList<>();
            if (fileIds == null) {
                return null;
            }
            String[] split = StringUtils.split(fileIds, ",");
            for (String s : split) {
                ids.add(Integer.parseInt(s));
            }
            return ids;
        }
    
        private List getStartCmds(String startCmd) {
            List cmd = new ArrayList<>();
            if (startCmd == null) {
                return cmd;
            }
            String[] split = StrUtil.split(startCmd, StartCmdSeparate.SIGN);
            cmd.addAll(Arrays.asList(split));
            return cmd;
    
        }
    
        public static Boolean needCd(String s) {
            String[] splits = StrUtil.split(s, "&&");
            int maxIndex = splits.length - 1;
            String cmd = splits[maxIndex];
            if (StrUtil.startWith(cmd, "cd")) {
                return false;
            } else {
                return true;
            }
    
        }
    }

    文件采集

    同上,调用两个工具类

    @Override
        public void fileCollection(HostInfo hostInfo, String remotePath, String localPath) {
            ansibleCreateHost(hostInfo, null);
            try {
                log.info("remote file path = {}", remotePath);
                log.info("local file path = {}", localPath);
    
                // 文件采集
                AnsibleExecuteTheOrderUtils.fileCollection(ansibleConfigurationItemVo.getHostGroup(), remotePath,
                    localPath , ansibleConfigurationItemVo.getDirectory());
            } catch (Exception e) {
                log.error("主机[{}]文件采集失败,主机ID[{}]:", hostInfo.getHost(), hostInfo.getId(), e);
                throw exceptionBuildService.buildException(OperationExceptionCode.EXECUTE_CMD_ERROR,
                    new Object[] {e.getMessage()});
    
            } finally {
                AnsibleExecuteTheOrderUtils.disconnect();
            }
    
        }
    本文内容来源于网友投稿,如有侵权请联系删除。
    作者最新文章
    编程开发 Java
    相关文章 更多
    链表删除节点的时间复杂度是多少及其详细分析
    链表删除节点的时间复杂度是多少及其详细分析

    详细分析链表删除节点的时间复杂度,深入探讨单链表与双向链表在不同已知前提下的查找与删除开销,并结合完整代码与清晰图解进行对比总结。

    codex如何配置模型参数及文件设置教程
    codex如何配置模型参数及文件设置教程

    想知道如何让AI写出的代码更贴合你的习惯?本文手把手教你在VS Code中调整Codex相关模型参数,通过修改配置文件优化温度值和令牌限制,解决代码建议不准确或响应慢的问题。

    Claude Code AI编程工具实力揭秘与编程助手实测
    Claude Code AI编程工具实力揭秘与编程助手实测

    通过实测展示Claude Code在终端中如何理解自然语言指令、自动修改代码文件并处理复杂编程任务,帮助开发者评估其实际辅助能力。

    winforms教程自学入门与基础开发步骤详解
    winforms教程自学入门与基础开发步骤详解

    本教程详细讲解如何使用Visual Studio创建WinForms项目,通过添加按钮和标签控件并编写点击事件代码,实现一个基础的计数器功能,适合C#初学者快速上手Windows窗体应用开发。

    Cursor自动补全设置教程教你快速开启代码补全功能
    Cursor自动补全设置教程教你快速开启代码补全功能

    详解Cursor编辑器中自动补全功能的开启与优化设置,涵盖Tab触发机制、上下文窗口调整及模型切换,帮助开发者解决补全延迟、干扰大等问题,提升编码流畅度。

    pandas的数据格式怎么转换和设置方法教程
    pandas的数据格式怎么转换和设置方法教程

    详解Pandas中数据格式转换的核心方法,包括astype强制转换、to_numeric容错处理及日期解析技巧,解决常见类型错误并提升数据处理效率。

    VS Code中文设置方法 简体语言包安装与切换教程
    VS Code中文设置方法 简体语言包安装与切换教程

    详细介绍在Visual Studio Code中安装Chinese (Simplified)语言包的方法,包括通过扩展市场搜索、安装及自动重启切换至简体中文界面的完整步骤,帮助开发者快速将编辑器本地化。

    cursor安装过程无法更改安装位置的解决方法
    cursor安装过程无法更改安装位置的解决方法

    针对Cursor安装包默认锁定C盘且无路径选择界面的问题,提供通过手动移动文件并创建目录联结(Symbolic Link)的解决方案,实现将软件安装在其他磁盘分区。

    rust下载安装教程详解及Windows环境配置方法
    rust下载安装教程详解及Windows环境配置方法

    详解Windows系统下Rust语言的安装步骤,重点解析rustup工具链管理机制,解决环境变量配置错误及MSVC链接器缺失问题,提供可复制的命令验证方法与常见报错的因果排查思路。

    vs code怎么配置 chat实用设置教程步骤
    vs code怎么配置 chat实用设置教程步骤

    详解VS Code中Chat插件的安装与核心配置步骤,重点解决API连接失败、响应慢等常见问题,通过优化上下文设置提升代码生成质量,适合希望集成AI辅助工具的开发者阅读。

    查看更多
    精品专题 更多
    装机必备
    装机必备

    正软商城装机必备专区,精选办公、浏览器、安全防护、影音播放、压缩解压、设计创作和系统工具等电脑常用正版软件,帮助用户快速完成新电脑软件配置。

    Windows
    Windows

    正软商城Windows软件专区,汇集适用于Windows电脑的办公、设计、安全防护、影音播放、开发工具和系统优化软件,提供软件介绍、系统要求、正版授权及购买下载服务。

    macOS软件
    macOS软件

    正软商城macOS软件专区,精选适用于Mac电脑的办公、设计、影音、效率、开发和系统工具,提供软件功能介绍、macOS兼容版本、正版授权及购买下载服务。

    Mac软件 更多
    photoshop
    photoshop
    Windows、macOS 、 iPad

    Photoshop 2026 是 Adobe 推出的专业图像处理与视觉设计软件,支持 Windows、macOS 和 iPad 等平台,广泛应用于摄影修图、电商设计、平面海报、数字绘画及视觉合成等创作场景。

    Blender
    Blender
    Windows、macOS 和 Linux

    Blender 是一款免费开源、跨平台的专业 3D 创作软件,集建模、动画、渲染、视频编辑与视觉合成等功能于一体,广泛应用于影视动画、游戏设计和建筑可视化等领域。软件支持 Cycles 物理渲染器与 Eevee 实时渲染引擎,并提供多边形建模、骨骼绑定、物理模拟等专业工具。Blender 兼容 Windows、macOS 和 Linux 系统,安装包轻巧、运行流畅,依托活跃的全球开发者社区持续更新,是从初学者到专业创作者都值得选择的正版 3D 创作工具。

    灵活计算器
    灵活计算器
    macOS/iOS/Android

    灵活计算器是一款笔记式算数应用,支持实时计算、动态关联和云端同步功能。记录、整理和输出之间的过渡会更自然,适合长期写作、做笔记或持续沉淀个人内容。

    WINDOWS 更多
    3dmax(3ds max)
    3dmax(3ds max)
    Windows

    Autodesk 3ds Max 是一款专业的三维建模、动画与渲染软件,广泛应用于建筑可视化、游戏开发、影视动画、广告设计和产品展示等领域。

    photoshop
    photoshop
    Windows、macOS 、 iPad

    Photoshop 2026 是 Adobe 推出的专业图像处理与视觉设计软件,支持 Windows、macOS 和 iPad 等平台,广泛应用于摄影修图、电商设计、平面海报、数字绘画及视觉合成等创作场景。

    Blender
    Blender
    Windows、macOS 和 Linux

    Blender 是一款免费开源、跨平台的专业 3D 创作软件,集建模、动画、渲染、视频编辑与视觉合成等功能于一体,广泛应用于影视动画、游戏设计和建筑可视化等领域。软件支持 Cycles 物理渲染器与 Eevee 实时渲染引擎,并提供多边形建模、骨骼绑定、物理模拟等专业工具。Blender 兼容 Windows、macOS 和 Linux 系统,安装包轻巧、运行流畅,依托活跃的全球开发者社区持续更新,是从初学者到专业创作者都值得选择的正版 3D 创作工具。