Search Results

Search found 12 results on 1 pages for 'ks78'.

Page 1/1 | 1 

  • How to start a s3ql script automatically on boot?

    - by ks78
    I've been experimenting with s3ql on Ubuntu 10.04, using it to mount Amazon S3 buckets. However, I'd really like it to mount them automatically. Does anyone know how to do that? I've been working on a script, which works when its run from from the commandline, but for some reason I can't get it to run automatically on boot. Does anyone have any ideas? Here's my script: #! /bin/sh # /etc/init.d/s3ql # ### BEGIN INIT INFO # Provides: s3ql # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO case "$1" in start) # Redirect stdout and stderr into the system log DIR=$(mktemp -d) mkfifo "$DIR/LOG_FIFO" logger -t s3ql -p local0.info < "$DIR/LOG_FIFO" & exec > "$DIR/LOG_FIFO" exec 2>&1 rm -rf "$DIR" modprobe fuse fsck.s3ql --batch s3://mybucket exec mount.s3ql --allow-other s3://mybucket /mnt/s3fs ;; stop) umount.s3ql /mnt/s3fs ;; *) echo "Usage: /etc/init.d/s3ql{start|stop}" exit 1 ;; esac exit 0

    Read the article

  • Attempting to update Amazon Route53 using a script, but domain is not being updated

    - by ks78
    I have several Amazon EC2 instances, running Ubuntu 10.04, with which I'd like to use Amazon's Route53. I setup a script as described in Shlomo Swidler's article, but I'm still missing something. When the script runs, it doesn't return any output, which I initially assumed meant it ran correctly. However, when I check the DNS records using MyR53DNS, there are no entries for my instances. Here's my script: #!/bin/tcsh -f set root=`dirname $0` setenv EC2_HOME /usr/lib/ec2-api-tools setenv EC2_CERT /etc/cron.route53/ec2_x509_cert.pem setenv EC2_PRIVATE_KEY /etc/cron.route53/ec2_x509_private.pem setenv AWS_ACCESS_KEY_ID myaccesskeyid setenv AWS_SECRET_ACCESS_KEY mysecretaccesskey /user/bin/ec2-describe-instances | \ perl -ne '/^INSTANCE\s+(i-\S+).*?(\S+\.amazonaws\.com)/ \ and do { $dns = $2; print "$1 $dns\n" }; /^TAG.+\sShortName\s+(\S+)/ \ and print "$1 $dns\n"' | \ perl -ane 'print "$F[0] CNAME $F[1] --replace\n"' | \ xargs -n 4 $/etc/cron.route53/cli53/cli53.py \ rrcreate -x 60 mydomain.com Does anyone see a problem with this script? If its not the script, what else could be preventing my Route53 domain from being updated? I am using the Security Groups to IP-restrict the instances. I've tried opening port 53, but that didn't seem to have an effect. Is there another port that Route53 uses? I'd appreciate any help or guidance the ServerFault community can offer. Let me know if you need any further info.

    Read the article

  • What's required to configure Ubuntu to use a specific DNS server?

    - by ks78
    I've setup two Amazon EC2 instances, both running Ubuntu Server. One is configured as a DNS server running bind9, which will be used to allow EC2 instances to communicate with each other based on hostname rather than IP, since their private IPs may change. I think I have the DNS server setup correctly. I want to use the second EC2 instance to test the DNS server. Using Webmin, I've added the DNS server's private IP to the client's DNS Servers list and added the domain to the Search Domains list. I did have to edit /etc/dhcp3/dhclint.conf to make my changes stick. After reboot, I expected I'd be able to ping or nslookup the DNS server from the test client, but it can't seem to find the server. Is there something I'm missing? What's required to configure an Ubuntu client to use a DNS server? I just want to make sure I'm not missing something before I assume the server's the problem.

    Read the article

  • What could prevent one Amazon EC2 instance from pinging another instance's Private IP?

    - by ks78
    I have multiple Amazon EC2 instances which need to communicate using private IPs. However, so far I've been unable to ping one instance's private IP from another instance. I can ping external addresses, such as their Elastic IPs and other sites (yahoo, google, etc), so it seems there's nothing wrong with the instances' network configuration. Also, they are all in the same zone, so that shouldn't be an issue. Does anyone have any idea what I could be doing wrong? Could this related to the Security Group settings?

    Read the article

  • How to start a s3ql script automatically on boot?

    - by ks78
    I've been experimenting with s3ql on Ubuntu 10.04, using it to mount Amazon S3 buckets. However, I'd really like it to mount them automatically. Does anyone know how to do that? I've been working on a script, which works when its run from from the commandline, but for some reason I can't get it to run automatically on boot. Does anyone have any ideas? Here's my script: #! /bin/sh # /etc/init.d/s3ql # ### BEGIN INIT INFO # Provides: s3ql # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start daemon at boot time # Description: Enable service provided by daemon. ### END INIT INFO case "$1" in start) # Redirect stdout and stderr into the system log DIR=$(mktemp -d) mkfifo "$DIR/LOG_FIFO" logger -t s3ql -p local0.info < "$DIR/LOG_FIFO" & exec > "$DIR/LOG_FIFO" exec 2>&1 rm -rf "$DIR" modprobe fuse fsck.s3ql --batch s3://mybucket exec mount.s3ql --allow-other s3://mybucket /mnt/s3fs ;; stop) umount.s3ql /mnt/s3fs ;; *) echo "Usage: /etc/init.d/s3ql{start|stop}" exit 1 ;; esac exit 0

    Read the article

  • What settings need to be changed to allow EC2 instances to use Amazon's Route 53 for DNS?

    - by ks78
    I have a number of Amazon EC2 instances, all running Ubuntu, which I'd like to configure to use Amazon's Route 53. I setup a script, following Shlomo Swidler's article, but ran into script-related issues, which were answered here. Now, I have the script working, but my instances are still not able to access Route 53's DNS. By this I mean, they are not able to resolve hostnames to IP addresses. My instances are currently configured with the DNS server IP address Amazon pushes out to them by default, does that need to be changed when using Route 53? I'm also IP-restricting my instances using the Security Groups. Could that be the problem? Is there a certain IP address or port I should open to allow communication with Route 53? It seems that DNS requests should be originating from my instances so the Security Groups shouldn't be an issue, but I've been wrong before. If anyone has any ideas, I'd really appreciate it.

    Read the article

  • How to configure Amazon Security Groups to achieve multi-tier architecture?

    - by ks78
    What is the preferred way to configure Amazon Security Groups to achieve a multi-tier architecture? Each of my instances has its own Security Group, which I only want to use for rules specific to an instance. I'd like to keep any rules which apply to multiple instances in a separate Security Group, which can then be assigned to instance Security Groups as necessary. As an example, I've setup a group called "admin", which allows administrative access from my IP. I added the "admin" group as the source to each of my instance security groups. However, I still can't access the instances from my IP without adding the rules directly to the instance's group. Am I missing something? Although it seems a multi-tier security architecture should be possible, it doesn't seem to be working.

    Read the article

  • How to configure Amazon Security Groups to achieve multi-tier architecture?

    - by ks78
    What is the preferred way to configure Amazon Security Groups to achieve a multi-tier architecture? Each of my instances has its own Security Group, which I only want to use for rules specific to an instance. I'd like to keep any rules which apply to multiple instances in a separate Security Group, which can then be assigned to instance Security Groups as necessary. As an example, I've setup a group called "admin", which allows administrative access from my IP. I added the "admin" group as the source to each of my instance security groups. However, I still can't access the instances from my IP without adding the rules directly to the instance's group. Am I missing something? Although it seems a multi-tier security architecture should be possible, it doesn't seem to be working.

    Read the article

  • How to secure a group of Amazon EC2 instances

    - by ks78
    I have several Amazon EC2 instances running Ubuntu 10.04 and I've recently started using Amazon's Route 53 as my DNS. The purpose of doing that was to allow the instances to refer to each other by name rather than private IP (which can change). I've pointed my domain name (via GoDaddy) to Amazon's name servers, allowing me to access my EC2 webservers. However, I noticed I can now access the EC2 instances which I don't want to be public, such as the dedicated MySQL Server. I was thinking Amazon's Security Groups would still be in effect when using Route 53, but that doesn't seem to be the case. Before I started using Route 53, I was thinking of having one instance run a reverse proxy, which would help protect the web servers behind it. Then IP-restrict all the other instances. I know IP restricting can be done using the firewall within each instance, but should I ever need to access them from another IP address, I'd need a way in. Amazon's control panel made it a breeze to open a port when necessary. Does anyone have any suggestions for keeping EC2 instances secure, but also accessible to their administrator? Also, what's the best topology for a group of EC2 instances, consisting of web servers and a dedicated database server, from a security perspective? Does having a reverse proxy server even make sense?

    Read the article

  • How to set the skin of a DotNetNuke page through code?

    - by ks78
    I'm working on a DNN module that creates DNN pages (tabs) and places DNN modules on them through code. So, far that's working very well. However, I'd like it to also be able to programmatically set the page's skin and place the modules in the appropriate pane. Does anyone know how to do this using code? Solution: I set SkinSrc and ContainerSrc as mika suggested. Here's my source, if you're interested. This is where I set SkinSrc. ''' <summary>Create new DNN tab/page.</summary> Private Function CreatePage(ByVal ParentID As Integer, ByVal PageName As String, ByVal PageTitle As String, ByVal Description As String, ByVal Keywords As String, ByVal Permissions As TabPermissionCollection, Optional ByVal SkinSrc As String = "", Optional ByVal isVisible As Boolean = True, Optional ByVal LoadDefaultModules As Boolean = True) As Tabs.TabInfo Try Dim tabCtrlr As New TabController Dim newTab As New Tabs.TabInfo Dim newPermissions As TabPermissionCollection = newTab.TabPermissions Dim permissionProvider As PermissionProvider = permissionProvider.Instance Dim infPermission As TabPermissionInfo ' set new page properties newTab.PortalID = PortalId newTab.TabName = PageName newTab.Title = PageTitle newTab.Description = Description newTab.KeyWords = Keywords newTab.IsDeleted = False newTab.IsSuperTab = False newTab.IsVisible = isVisible newTab.DisableLink = False newTab.IconFile = "" newTab.Url = "" newTab.ParentId = ParentID 'add skinsrc if specified If (SkinSrc.Length > 0) Then newTab.SkinSrc = SkinSrc ' create new page tabCtrlr.AddTab(newTab, LoadDefaultModules) ' copy permissions selected in Permissions collection For index As Integer = 0 To (Permissions.Count - 1) infPermission = New TabPermissionInfo infPermission.AllowAccess = Permissions(index).AllowAccess infPermission.RoleID = Permissions(index).RoleID infPermission.RoleName = Permissions(index).RoleName infPermission.TabID = Permissions(index).TabID infPermission.PermissionID = Permissions(index).PermissionID 'save permission info newPermissions.Add(infPermission, True) permissionProvider.SaveTabPermissions(newTab) Next index 'return TabInfo of new page Return newTab Catch ex As Exception 'failure Return New Tabs.TabInfo End Try End Function These next two functions were taken from the DNN source and tweaked slightly, so I can't take credit for much of them. Also, if you use these in your own modules there could be issues when upgrading DNN. Although the upgrade from 5.05 to 5.06 went smoothly for me. In the AddNewModule function, I used ContainerSrc to specify the custom container to use. PaneName is the property used to specify which panel the module should be placed in. #Region "From DNN Source --mostly" #Region "Enums" Private Enum ViewPermissionType View = 0 Edit = 1 End Enum #End Region ''' ----------------------------------------------------------------------------- ''' <summary>Adds a New Module to a Pane</summary> ''' <param name="align">The alignment for the Module</param> ''' <param name="desktopModuleId">The Id of the DesktopModule</param> ''' <param name="permissionType">The View Permission Type for the Module</param> ''' <param name="title">The Title for the resulting module</param> ''' <param name="paneName">The pane to add the module to</param> ''' <param name="position">The relative position within the pane for the module</param> ''' ----------------------------------------------------------------------------- Private Function AddNewModule(ByVal TabID As Integer, ByVal title As String, ByVal desktopModuleId As Integer, ByVal paneName As String, ByVal position As Integer, ByVal permissionType As ViewPermissionType, ByVal align As String) As Integer Dim objTabController As New TabController Dim objTabPermissions As TabPermissionCollection = objTabController.GetTab(TabID, PortalId, True).TabPermissions Dim objPermissionController As New PermissionController Dim objModules As New ModuleController Dim objModuleDefinition As ModuleDefinitionInfo Dim objEventLog As New Services.Log.EventLog.EventLogController Dim newModuleID As Integer Dim j As Integer Try Dim desktopModule As DesktopModuleInfo = Nothing If Not DesktopModuleController.GetDesktopModules(PortalSettings.PortalId).TryGetValue(desktopModuleId, desktopModule) Then Throw New ArgumentException("desktopModuleId") End If Catch ex As Exception LogException(ex) End Try Dim UserId As Integer = -1 If Request.IsAuthenticated Then Dim objUserInfo As Users.UserInfo = UserController.GetCurrentUserInfo UserId = objUserInfo.UserID End If For Each objModuleDefinition In ModuleDefinitionController.GetModuleDefinitionsByDesktopModuleID(desktopModuleId).Values Dim objModule As New ModuleInfo objModule.Initialize(PortalSettings.PortalId) objModule.PortalID = PortalSettings.PortalId objModule.TabID = TabID objModule.ModuleOrder = position If title = "" Then objModule.ModuleTitle = objModuleDefinition.FriendlyName Else objModule.ModuleTitle = title End If objModule.PaneName = paneName objModule.ModuleDefID = objModuleDefinition.ModuleDefID If objModuleDefinition.DefaultCacheTime > 0 Then objModule.CacheTime = objModuleDefinition.DefaultCacheTime If Portals.PortalSettings.Current.DefaultModuleId > Null.NullInteger AndAlso Portals.PortalSettings.Current.DefaultTabId > Null.NullInteger Then Dim defaultModule As ModuleInfo = objModules.GetModule(Portals.PortalSettings.Current.DefaultModuleId, Portals.PortalSettings.Current.DefaultTabId, True) If Not defaultModule Is Nothing Then objModule.CacheTime = defaultModule.CacheTime End If End If End If Select Case permissionType Case ViewPermissionType.View objModule.InheritViewPermissions = True Case ViewPermissionType.Edit objModule.InheritViewPermissions = False End Select ' get the default module view permissions Dim arrSystemModuleViewPermissions As ArrayList = objPermissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", "VIEW") ' get the permissions from the page For Each objTabPermission As TabPermissionInfo In objTabPermissions If objTabPermission.PermissionKey = "VIEW" AndAlso permissionType = ViewPermissionType.View Then 'Don't need to explicitly add View permisisons if "Same As Page" Continue For End If ' get the system module permissions for the permissionkey Dim arrSystemModulePermissions As ArrayList = objPermissionController.GetPermissionByCodeAndKey("SYSTEM_MODULE_DEFINITION", objTabPermission.PermissionKey) ' loop through the system module permissions For j = 0 To arrSystemModulePermissions.Count - 1 ' create the module permission Dim objSystemModulePermission As PermissionInfo objSystemModulePermission = CType(arrSystemModulePermissions(j), PermissionInfo) If objSystemModulePermission.PermissionKey = "VIEW" AndAlso permissionType = ViewPermissionType.Edit AndAlso _ objTabPermission.PermissionKey <> "EDIT" Then 'Only Page Editors get View permissions if "Page Editors Only" Continue For End If Dim objModulePermission As ModulePermissionInfo = AddModulePermission(objModule, _ objSystemModulePermission, _ objTabPermission.RoleID, objTabPermission.UserID, _ objTabPermission.AllowAccess) ' ensure that every EDIT permission which allows access also provides VIEW permission If objModulePermission.PermissionKey = "EDIT" And objModulePermission.AllowAccess Then Dim objModuleViewperm As ModulePermissionInfo = AddModulePermission(objModule, _ CType(arrSystemModuleViewPermissions(0), PermissionInfo), _ objModulePermission.RoleID, objModulePermission.UserID, _ True) End If Next 'Get the custom Module Permissions, Assume that roles with Edit Tab Permissions 'are automatically assigned to the Custom Module Permissions If objTabPermission.PermissionKey = "EDIT" Then Dim arrCustomModulePermissions As ArrayList = objPermissionController.GetPermissionsByModuleDefID(objModule.ModuleDefID) ' loop through the custom module permissions For j = 0 To arrCustomModulePermissions.Count - 1 ' create the module permission Dim objCustomModulePermission As PermissionInfo objCustomModulePermission = CType(arrCustomModulePermissions(j), PermissionInfo) AddModulePermission(objModule, objCustomModulePermission, _ objTabPermission.RoleID, objTabPermission.UserID, _ objTabPermission.AllowAccess) Next End If Next objModule.AllTabs = False objModule.Alignment = align 'apply Custom Container to module objModule.ContainerSrc = CONTAINER_TRANSPARENT_PLAIN newModuleID = objModules.AddModule(objModule) Next Return newModuleID End Function ''' ----------------------------------------------------------------------------- ''' <summary>Adds a Module Permission</summary> ''' <param name="permission">The permission to add</param> ''' <param name="roleId">The Id of the role to add the permission for.</param> ''' ----------------------------------------------------------------------------- Private Function AddModulePermission(ByVal objModule As ModuleInfo, ByVal permission As PermissionInfo, ByVal roleId As Integer, ByVal userId As Integer, ByVal allowAccess As Boolean) As ModulePermissionInfo Dim objModulePermission As New ModulePermissionInfo objModulePermission.ModuleID = objModule.ModuleID objModulePermission.PermissionID = permission.PermissionID objModulePermission.RoleID = roleId objModulePermission.UserID = userId objModulePermission.PermissionKey = permission.PermissionKey objModulePermission.AllowAccess = allowAccess ' add the permission to the collection If Not objModule.ModulePermissions.Contains(objModulePermission) Then objModule.ModulePermissions.Add(objModulePermission) End If Return objModulePermission End Function #End Region

    Read the article

  • Image gallery control for ASP.Net with filtering capabilities

    - by ks78
    I'm writing an ASP.Net application which needs to display a large number of thumbnails, preferably in a paginated format. These thumbnails will be stored on the server's hard disk, but will have their filenames listed in a SQL Server database. What I want to do is to be able to filter the images being displayed based on criteria within the database. I've looked at the NotesForGallery control, which I really like, but it doesn't seem to have a way to do that. --if I'm wrong, please correct me. Are there any other image gallery type controls, preferably free, that can do what I need? I'm hoping someone can recommend a control or solution that will point me in the right direction. Thanks in advance.

    Read the article

  • How to use a VB usercontrol on a C# page?

    - by ks78
    Hopefully someone will be able to point me in the right direction. I've created a usercontrol in VB that handles paging more efficiently than the DataPager (at least for very large datasets). I'd like to use it in a C# project, but I've been having trouble getting it to work. I've tried simply adding PagingControl.ascx to the C# project, but when I do that the markup and VB code behind don't seem to see each other. --Is this a namespace issue? I've tried adding the PagingControl.ascx to its own VB project, then adding that project to the C# project's solution, as well as a reference. --That almost works. I can register the PagingControl usercontrol in the markup. I can access the usercontrol's properties in the code behind, but any property that involves the UI of the usercontrol fails. Its seems as if the usercontrol's form hasn't had a chance to load by the time the C# page's Page_Load event handler fires. --Maybe this is an "order of operations" problem? At what point in the C# page's lifetime should a usercontrol's form be loaded? If anyone has any ideas or insight, I'd really appreciate it. Thanks in advance.

    Read the article

1