Docker

IT管理员常用的管理、运维工具有哪些?

半腔热情 提交于 2021-02-18 07:37:49
IT管理员常用的管理、运维工具有哪些?先说说TCPcopy这个神器吧,貌似很多人都还在用着ab模拟测压力,TCPcopy能直接导入线上流量供上线前的风险测试。下面对使用过的工具会简单进行功能及使用场景介绍,并提及一些所了解的工具。 统一帐号管理: 你还在自己写脚本批量增加机器的用户、分组和修改密码或者同步主机的/etc/passwd吗?你还在使用脚本批量对用户设置权限吗?如果有一台帐号主机能够提供所有服务器的帐号、密码、权限控制,如此一来,如果想要增加、修改、刪除用户,只要到这台服务器上面处理即可,这样是不是很方便? LDAP 统一管理各种平台帐号和密码,包括但不限于各种操作系统(Windows、Linux)认证,Linux系统sudo集成(限制用户的sudo权限以及使用sudo的主机),用户可主机登入限制等 可与Apache,HTTP,FTP,SAMBA,ZABBIX,Jenkins等集成 支持密码策略(密码强度、密码过期时间、强制修改、超过验证错误次数锁定帐号)等 支持插件式鉴别模块PAM 不同平台权限的设定、划分 jumpserver 一款由python编写开源的跳板机(堡垒机)系统,实现了跳板机应有的功能。基于ssh协议来管理,客户端无需安装agent,目前本版本处于beta阶段,线上环境慎用。试用了一下demo,感觉在统一帐号管理方面并不成熟。 NIS 类似于LDAP

passing docker environment variables to .net core

让人想犯罪 __ 提交于 2021-02-18 07:34:29
问题 I've followed this article and the code on the github doesn't compile, tutorial is outdated I think. ( Configuration = builder.Build(); ) throws error. So how can I access env passed from docker? docker-compose myproj: image: mcr.microsoft.com/dotnet/core/sdk:2.2 restart: on-failure working_dir: /MyProj command: bash -c "dotnet build MyProj.csproj && dotnet bin/Debug/netcoreapp2.2/MyProj.dll" ports: - 5001:5001 - 5000:5000 volumes: - "./MyProj:/MyProj" environment: DATABASE_HOST: database

Easiest way to run Selenium tests in a Docker container over Jenkins CI

你。 提交于 2021-02-18 07:28:51
问题 I want to execute my automated tests, written in Nightwatch-Cucumber over a Jenkins CI in a Docker container. I have a Docker image that I want to use for it. This is what I want to do in more detail. Start tests over Jenkins CI job On the same machine the Docker image is loaded and the related Docker container will start. This container based on a Unix OS. Also, some configuration in Docker container will be executed. Tests will be executed (from local or remote) in a headless mode via xvfb

--mount=type=cache in buildkit

自作多情 提交于 2021-02-18 06:57:12
问题 I'm trying to get maven offline builds working from within a docker container. I've enabled buildkit. I've run mvn dependency:go-offline -s ~/checkouts/settings.xml to cache the dependencies in /root/.m2 of host machine. I wish to use this inside the container that builds maven project. Here is my Dockerfile: #syntax=docker/dockerfile:experimental FROM maven:3.6.1-jdk-11 AS build WORKDIR / COPY . / RUN --mount=type=cache,target=/root/.m2 mvn -o install FROM scratch COPY --from=build /admin

Gracefully stopping ecs container

僤鯓⒐⒋嵵緔 提交于 2021-02-18 06:44:31
问题 I am having some docker container which listens on RabbitMQ and process the message received.I have a code pipeline which kicks off the rebuilding of the image and updating the tasks when there is a code commit. My problem here is the container will be killed abruptly during the message processing is there any way where i can stop the container killing until the process is finished and allow it to stop so that a new new container will be automatically created as i am ok with the current

How to make HDFS work in docker swarm

有些话、适合烂在心里 提交于 2021-02-18 06:44:07
问题 I have troubles to make my HDFS setup work in docker swarm. To understand the problem I've reduced my setup to the minimum : 1 physical machine 1 namenode 1 datanode This setup is working fine with docker-compose, but it fails with docker-swarm, using the same compose file. Here is the compose file : version: '3' services: namenode: image: uhopper/hadoop-namenode hostname: namenode ports: - "50070:50070" - "8020:8020" volumes: - /userdata/namenode:/hadoop/dfs/name environment: - CLUSTER_NAME

Periodic “Lost connection to MySQL server during query” after Dockerizing Flask Web App

主宰稳场 提交于 2021-02-18 06:37:40
问题 I have a Flask web app that used to run on a standalone server using the following: Flask/SQLAlchemy MariaDB uwsgi nginx On the stand alone server this application ran fine. I have since "dockerized" this application across two containers: uwsgi-nginx-flask MariaDB Every since dockerizing I occasionally get this error (entire traceback posted at the end): Lost connection to MySQL server during query The MariaDB log shows the following errors with verbose logging: 2020-05-10 18:35:32 130

How do I change timezone in a docker container?

只谈情不闲聊 提交于 2021-02-18 05:24:06
问题 I am running docker container for my development stack which I pulled from docker-hub, the image is created for a different timezone than where my application is supposed to be deployed. How do I change timezone in a docker container? I tried to change the timezone config within the container by running echo "Africa/Lusaka" > /etc/timezone and restarted the container but I still get the same timezone. 回答1: You can override as suggest by @LinPy during the run stage, but if you want to set at

What does `--oom-kill-disable` do for a Docker container?

为君一笑 提交于 2021-02-18 05:19:28
问题 I have understood that docker run -m 256m --memory-swap 256m will limit a container so that it can use at most 256 MB of memory and no swap. If it allocates more, then a process in the container (not "the container") will be killed. For example: $ sudo docker run -it --rm -m 256m --memory-swap 256m \ stress --vm 1 --vm-bytes 2000M --vm-hang 0 stress: info: [1] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd stress: FAIL: [1] (415) <-- worker 7 got signal 9 stress: WARN: [1] (417) now reaping child

What does `--oom-kill-disable` do for a Docker container?

二次信任 提交于 2021-02-18 05:17:15
问题 I have understood that docker run -m 256m --memory-swap 256m will limit a container so that it can use at most 256 MB of memory and no swap. If it allocates more, then a process in the container (not "the container") will be killed. For example: $ sudo docker run -it --rm -m 256m --memory-swap 256m \ stress --vm 1 --vm-bytes 2000M --vm-hang 0 stress: info: [1] dispatching hogs: 0 cpu, 0 io, 1 vm, 0 hdd stress: FAIL: [1] (415) <-- worker 7 got signal 9 stress: WARN: [1] (417) now reaping child