ما در گنو/لینوکس به روش های مختلف میتونیم ip بدیم و شبکه را مدیریت کنیم // یکی Network Manager گرافیکی و دیگری فایل /etc/network/interfaces هست // بیشتر در سرور قسمت دوم مطرح هست // چون بیشتر محیط گرافیکی نصب نیست // برای ثابت موندن جدول مسیر یابی بعد از هر بار ریستارت شبکه داریم : (همینطور که میدونیم دستور route (جدول مسیر یابی ) بعد از هر بار ریستارت خذف میشه )
در فایل : etc/network/interfaces موارد زیر را به این صورت میتونیم بدیم :
post-up route add default gw 192.168.1.1
در اینجا ما getway پیش فرض را ۱۹۲٫۱۶۸٫۱٫۱ دادیم
post-up command
Run command after bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface as
configured (even though it has really been configured), prints an error message, and exits with status 0. This behavior may
نکته : حتی میتونیم زمانی که اینترفیس down شد ساختار بدیم با post-down
post-down command
Run command after taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured,
and exits with status 0. This behavior may change in the future.
نکته : حتی حد فاصل میان این دو هم داریم :
pre-down command
Run command before taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured
(even though it has not really been deconfigured), and exits with status 0. This behavior may change in the future.
pre-up command
Run command before bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface
as configured, prints an error message, and exits with status 0. This behavior may change in the future.
در فایل : etc/network/interfaces موارد زیر را به این صورت میتونیم بدیم :
post-up route add default gw 192.168.1.1
در اینجا ما getway پیش فرض را ۱۹۲٫۱۶۸٫۱٫۱ دادیم
post-up command
Run command after bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface as
configured (even though it has really been configured), prints an error message, and exits with status 0. This behavior may
نکته : حتی میتونیم زمانی که اینترفیس down شد ساختار بدیم با post-down
post-down command
Run command after taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured,
and exits with status 0. This behavior may change in the future.
نکته : حتی حد فاصل میان این دو هم داریم :
pre-down command
Run command before taking the interface down. If this command fails then ifdown aborts, marks the interface as deconfigured
(even though it has not really been deconfigured), and exits with status 0. This behavior may change in the future.
pre-up command
Run command before bringing the interface up. If this command fails then ifup aborts, refraining from marking the interface
as configured, prints an error message, and exits with status 0. This behavior may change in the future.
Forwarded from yashar esmaildokht 🐧
داکر یا در اصطلاح اصلی آن Docker ، یک پلت فرم متن باز برای ساخت ، ارسال و اجرای هر اپلیکیشنی بدون وابستگی به مکان می باشد . شامل ۴ مولفه اصلی است : موتور داکر ( قابلیت حمل دارد بازمان اجرای خیلی کم) ، یک هاب داکر ،ابزارهای بسته بندی و یک سرویس ابری برای به اشتراک گذاشتن اپلیکیشن ها و خودکار سازی جریان کار . داکر اپلیکیشن ها را قادر می سازد به سرعت از اجزایشان اسمبل شوند و اصطکاک مابین توسعه ، QA و محیط تولید را حذف کند .
Forwarded from yashar esmaildokht 🐧
کاربرد اصلی داکر برای توسعه دهندگان و ادمین سیستم ها است . چرا؟
برای توسعه دهندگان ، با داکر توسعه دهنده می تواند هراپلیکیشنی با هر زبانی بسازد . اپلیکیشن های Dockerized قابل حمل اند و هر جایی می توانند اجرا شوند در دیتا سنترها ، لپ تاپ ها و اوبونتو سرورهای ابری .
برای توسعه دهندگان ، با داکر توسعه دهنده می تواند هراپلیکیشنی با هر زبانی بسازد . اپلیکیشن های Dockerized قابل حمل اند و هر جایی می توانند اجرا شوند در دیتا سنترها ، لپ تاپ ها و اوبونتو سرورهای ابری .
Forwarded from yashar esmaildokht 🐧
برای ادمین های سیستم ، داکر محیط استانداردی برای تیم توسعه ، QA و تولیدشان ارائه می دهند و دیگر به چیزی به عنوان ” سیستم من ” نیازی نیست . با کمک داکر می توانند هر اپلیکیشنی را روی هر زیرساختی به سرعت اجرا کنند .
Forwarded from yashar esmaildokht 🐧
داکر به ما این امکان رو میده هر لحظه از هر جا اشتباه کردی به عقب برگردی بدون اینکه سرورت مشکلی پیدا کنه و همه اینها به خاطر ایمیج هایی هست که می توانیم در هرلحظه از هر بخش سرور ایجاد کنیم .
Forwarded from yashar esmaildokht 🐧
برای استفاده از این بستر، ابتدا باید نرم افزار مدیریتی داکر (docker engine) روی سیستم عامل ما نصب شود . در مرحله بعد، از روی مخزن نرم افزار بسیار کامل آن ، نرم افزار مورد نیاز برای اجرا که تمام تنظیمات آن هم انجام شده است را انتخاب و بارگزاری می کنیم . (به هر نرم افزار پیکربندی شده روی سرور داکر یک ایمیج یا تصویر گفته میشود)
Forwarded from yashar esmaildokht 🐧
در مرحله بعد آنرا اجرا می کنیم . این نرم افزار درون یک محفظه (container) با رم و سیستم عامل اختصاصی خود کار خواهد کرد و به بقیه سیستم کاری نخواهد داشت و به دلیل مکانیزم ذخیره و اجرای داکر که از امکانات پیشرفته لینوکس (LXC) استفاده کرده است ، به راحتی و با سرعت شروع به کار خواهد کرد .
Forwarded from yashar esmaildokht 🐧
می توان اینگونه فرض کرد که با داکر ما به جای ایمیج گرفتن از یک سیستم عامل و اجرای آن در VirtualBox یا VMWare ، از یک نرم افزار با تمام پیکربندی و تنظیمات آن یک ایمیج می گیریم و هر جا نیاز شد سریعاً آنرا بارگذاری و اجرا میکنیم .
Forwarded from yashar esmaildokht 🐧
توی داکر این مفهوم را داریم :
Docker daemon: runs on a host
Client: connects to the daemon, and is the primary user interface
Images: read-only template used to create containers
Containers: runnable instance of a Docker image
Registry: private or public registry of Docker images
Services: a scheduling service called Swarm which enables multi-host, multi-container deployment. Swarm was introduced in version 1.12
#lxc #container @unixmens
Docker daemon: runs on a host
Client: connects to the daemon, and is the primary user interface
Images: read-only template used to create containers
Containers: runnable instance of a Docker image
Registry: private or public registry of Docker images
Services: a scheduling service called Swarm which enables multi-host, multi-container deployment. Swarm was introduced in version 1.12
#lxc #container @unixmens
#Storage Management LXC vs Docker
بحث مدیریت استوریج در lxc ساده تر هست // این یعنی درگیر نشدن به ساختارهای اضافی
که موارد زیر را کاملا ساپورت میکنه : btrfs, lvm, overlayfs, and zfs
مسیر روت فایل سیستم در lxc :
/var/lib/lxc/[container-name]/rootfs
که میتونید share کنید با nfs و ...
که موارد زیر را کاملا ساپورت میکنه : btrfs, lvm, overlayfs, and zfs
مسیر روت فایل سیستم در lxc :
/var/lib/lxc/[container-name]/rootfs
که میتونید share کنید با nfs و ...
BSD jails and LXC
فوکوسش برای devops هست و ساختار و را هکار سبک مجازی سازی
با ssh بصورت مستقیم ساپورت میکنه
فوکوسش برای devops هست و ساختار و را هکار سبک مجازی سازی
با ssh بصورت مستقیم ساپورت میکنه